Optimizing an SQL statment
- From: "jj" <no@xxxxxxxx>
- Date: Mon, 31 Oct 2005 13:32:20 -0500
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)
THanks!
.
- Prev by Date: Re: Obtaining my IP
- Previous by thread: Obtaining my IP
- Index(es):
Relevant Pages
|