MySQL Forums
Forum List  »  InnoDB

Re: How does size affect this query?
Posted by: KimSeong Loh
Date: February 22, 2008 02:57PM

It will retrieve all the records with 1 and then sort them, and to remove the duplicates, then returns first 150 rows.

It will be fast if you remove the order by and distinct.

Also, the correct way to use distinct is
select distinct thingid from

distinct applies to all columns return by the select statement, not 1 particular column, since your select retunrs 1 column only, it works the same.

Options: ReplyQuote


Subject
Views
Written By
Posted
2640
February 22, 2008 12:59PM
Re: How does size affect this query?
1374
February 22, 2008 02:57PM


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.