MySQL Forums
Forum List  »  Newbie

Re: optimization
Posted by: Roland Bouman
Date: August 03, 2005 04:05PM

I just wanted to add, this does not guarantee that you are getting the last entry in your table, it is only getting you the record wich has the largest value for the particular date column. In particular, if you did not take precautions against it, you can expect multiple records with all of these MAX solutions.

Note that in you LIMIT solution, you are guaranteed to get just one record, but there may be more records with the same value for the date column you ORDERed BY. In that case too, you are only guaranteed to get a record with the largest value for the date column, not The Last Entry.

Options: ReplyQuote


Subject
Written By
Posted
August 03, 2005 03:42PM
August 03, 2005 04:01PM
Re: optimization
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.