MySQL Forums
Forum List  »  Optimizer & Parser

Re: Prevent DISTINCT from using temporary tables
Posted by: Shlomi Noach
Date: August 30, 2008 11:42AM

For performing a DISTINCT operation, MySQL first sorts the rows by the distinct column ('chromosome' in your case) for those rows matching the WHERE condition.
A simple way to avoid sorting would be to have an index on the two columns 'dataset_id','chromosome')

Shlomi

Options: ReplyQuote


Subject
Views
Written By
Posted
Re: Prevent DISTINCT from using temporary tables
6687
August 30, 2008 11:42AM


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.