MySQL Forums
Forum List  »  Optimizer & Parser

How to list data effectively
Posted by: sricharan vemuri
Date: February 10, 2010 09:55AM

Hi all
I am charan, I have a question regarding the site http://shopgala.com on which I am currently working. The site has a left nav dropdown where I need to display all the stores in the table.

When I write the query ("select fld_1, fld_2 from tbl_name") it works fine. I know that because I use explain for each query I write which tells me if there are any extras and missing keys. Here is the tricky part while displaying the stores I need to display them in alphabetical order so I changed the query to be
("select fld_1, fld_2 from tbl_name order by fld_1 ASC") and when I use the explain it gives me its using filesort, temporary table.

How can I modify the query or table so that the query does not use filesort. Can I use indexes on varchar field.

Thank You
Charan

Options: ReplyQuote


Subject
Views
Written By
Posted
How to list data effectively
2877
February 10, 2010 09:55AM
1475
February 11, 2010 10:56PM
1491
February 12, 2010 08:21AM


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.