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
4524
September 06, 2005 05:35PM
2506
September 06, 2005 06:39PM
Re: Optimizing ORDER BY any ideas?
2681
September 06, 2005 08:30PM
2444
September 06, 2005 09:18PM
2440
September 07, 2005 07:10AM
2406
September 07, 2005 06:28PM
2454
September 07, 2005 08:55PM
2313
September 08, 2005 08:28AM
2357
September 08, 2005 11:12PM
2387
September 09, 2005 10:00AM
2338
September 09, 2005 10:22AM
2333
September 09, 2005 10:03PM
2541
September 10, 2005 07:30AM
2911
September 10, 2005 09:22AM
2337
September 12, 2005 02:45PM
2289
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.