MySQL Forums
Forum List  »  Optimizer & Parser

default order by
Posted by: Joel Webb
Date: July 06, 2007 08:49AM

Is there any way to change the index default on a table so that when you perform a query it will automatically use your "ranking" rather then the primary key?

For example: you create a table with 3000 entries, and you perform a search on that table with no "ORDER BY" clause, what does it use to sort the results? It doesn't use timestamp or anything like that.

What we are trying to do is speed queries up because the majority of our slow queries are coming because we are doing the search and doing an ORDER BY on the results. The results are normally 30000 items. I now 30000 sounds like a lot but we have about 300000 in our database.

Options: ReplyQuote


Subject
Views
Written By
Posted
default order by
4733
July 06, 2007 08:49AM


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.