MySQL Forums
Forum List  »  Optimizer & Parser

Re: Optimizing ORDER BY any ideas?
Posted by: Marc Van Olmen
Date: September 06, 2005 08:30PM

hi Jay,

thanks for your thoughts on this. The query is just a smaller version of bigger query that takes about 3 seconds in the end. I just narrowed the bottleneck down to this query. Sorting takes time I agree... but sorting shouldn't take time at all in my opinion if you could preindex the order....

For example when I do select/sorting on one table the sorting happens in 0.0003 seconds on the same amount of records because it is using the index.

For reporting I need to do like 20 times similar query, so it takes a minute to generate the report... so looking for a way to optimize the query....

just was hoping that with some indexing trick I could optimize a few things...

I have written my own database algorithms for database a few years ago that does some similar things in miliseconds.

Should I think about creating temporary table or a view? I'm using 5.0b12.

For example a few thoughts... I had about it... could I sort in a view or temporary table the T_SALES_ORDER_ITEM first in a temporary table on the field... PRY_EXPORT_CITY from the other table...

just some random thoughts I had, just looking for some more input ideas on this matter.

thx

marc

Options: ReplyQuote


Subject
Views
Written By
Posted
5140
September 06, 2005 05:35PM
2839
September 06, 2005 06:39PM
Re: Optimizing ORDER BY any ideas?
3016
September 06, 2005 08:30PM
2784
September 06, 2005 09:18PM
2768
September 07, 2005 07:10AM
2731
September 07, 2005 06:28PM
2806
September 07, 2005 08:55PM
2608
September 08, 2005 08:28AM
2716
September 08, 2005 11:12PM
2712
September 09, 2005 10:00AM
2649
September 09, 2005 10:22AM
2659
September 09, 2005 10:03PM
2909
September 10, 2005 07:30AM
3305
September 10, 2005 09:22AM
2685
September 12, 2005 02:45PM
2618
September 12, 2005 04:41PM


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.