MySQL Forums
Forum List  »  Newbie

Indexes and GROUP BY
Posted by: John Kendall
Date: September 10, 2004 02:52AM

Not sure how indexes work with ORDER BY and GROUP BY.
What index should I create which will be used on

SELECT '' As ID, `Source Presidency` As Presidency, `Source Name` As Name,
MIN(`Source Year`) As `Start Date`, MAX(`Source Year`) As `End Date` FROM
burialdeathfull GROUP BY `Source Presidency`, `Source Name` ORDER BY `Source
Presidency`, `Start Date`

or even just

SELECT * FROM burialdeathfull GROUP BY `Source Presidency`, `Source Name`

Everything I try doesn't work.

Thanks

John


Options: ReplyQuote


Subject
Written By
Posted
Indexes and GROUP BY
September 10, 2004 02:52AM
September 10, 2004 07:59AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.