MySQL Forums
Forum List  »  Optimizer & Parser

Re: Can I speed this up?
Posted by: Eljakim Schrijvers
Date: February 17, 2007 11:23AM

I guess writing things out already helps a lot;

I figured that the having() clause must cause the slowness, and there is another way of writing the same:

select btw_omschrijving, sum(boe_prijs_netto / btw_percentage) /100.0, sum(boe_prijs_netto / btw_percentage * (btw_percentage - 1) )/100.0, sum(boe_prijs_netto) /100.0 
from tblbtw left join tblartikel on art_btw_id = btw_id  left join tblartikelinstance on ari_art_id = art_id left join tblartikelverhuur on avh_ari_id = ari_id left join tblboeking on (boe_avh_id = avh_id or  boe_art_id = art_id) and boe_zle_id = 107 
where boe_prijs_netto is not null 
group by btw_id;

This is already a bit faster, but still too slow for my actual purpose;
the speed is now 0.50 sec. (a 4 time improvement already).

Can I get this down to <.10 sec?

Eljakim

Options: ReplyQuote


Subject
Views
Written By
Posted
5334
February 17, 2007 11:18AM
Re: Can I speed this up?
3090
February 17, 2007 11:23AM
2911
February 25, 2007 11:40PM
2990
March 10, 2007 01:23PM
2861
March 11, 2007 12:59AM
2831
April 26, 2007 01:04AM
2792
August 30, 2007 02:55AM


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.