MySQL Forums
Forum List  »  Newbie

optimization
Posted by: Eduardo Oda
Date: August 03, 2005 03:42PM

Hi everybody!

I need to get the last entry of a table, so I'm using the following query:

SELECT * FROM table WHERE (some conditions) ORDER BY date DESC LIMIT 0,1

This seems a little bit stupid... Does anybody know an another way to do that? Can I keep a ordered table and than avoi the use of "order by"? If yes, how can I do that?

Thaks in advance and sorry about my poor English!

eo

Options: ReplyQuote


Subject
Written By
Posted
optimization
August 03, 2005 03:42PM
August 03, 2005 04:01PM
August 03, 2005 04:05PM
August 04, 2005 07:30AM
August 04, 2005 08:09AM


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.