Re: Very long query doubt... (Monster query...)
Posted by:
Toni Lopez
Date: March 30, 2009 09:05AM
Ok, here it is, oh! one more thing:
This is part of a complex process, try to imagine about 75 querys, maybe 10 or 20 biggers, 30 from medium and the rest for smalls. If I put only 1 month(m1), compared with same month from past year(m2), and other month (remember the process is always made of pairs, like clas<->cod_art)(m3) compared with the same month past year(m4) [m1!=m2!=m3!=m4] it tooks about 20 minutes... if use the force index command with fecha(data) index (The best), it tooks about 17 or 18 minutes...
Can I make it faster??? Any ideas???
--------
Summary tables:
Well, in fact, this table (prepara_sales_mix), is a summary table made from other bigger so if I use other summary table... the maintenance and execution of the process will be eternal ...
pd: As you can see, isn't easy... and yes, I am not using the same value for clas...
Thanks for all.