indexing question
- by user522962
I have a table w/ 3 columns: name, phone, date.
I have 3 indexes: 1 on phone, 1 on date and 1 on phone and date.
I have the following statement:
SELECT * FROM ( SELECT * FROM people WHERE phone IS NOT NULL ORDER BY date DESC) as t GROUP BY phone
Basically, I want to get all unique phone numbers ordered by date. This table has about 2.5 million…