|
Posted by Stefan Rybacki on 10/31/05 22:01
jj wrote:
> Hi !
>
> I have a query that i run on my website, heres the pseudo code:
>
> select
>
> bottle_caps.caps_id,
>
> products.products_id,
> products.products_name,
> products.products_image,
> products.products_image_hi,
> products.products_status,
>
> price.price_option,
> price.price
>
> from
>
> bottle_caps, products, price
>
> where
>
> products.products_model = price.products_id
> AND
> price.products_id = bottle_caps.caps_id
> AND
> bottle_caps.bottle_id = $sub_products_id
>
>
> It works fine except for the fact that it takes about 3 seconds to execute.
> So there is a little bit of a hiccup on my site when this code is loaded.
> Im wondering is there something I could do to this SQL statement to make it
> execute faster?
> (the 3 tables are all about 2-4 thousand rows each)
Are there indices on the ids? What does Explain tell you?
Regards
Stefan
>
> THanks!
>
>
Navigation:
[Reply to this message]
|