Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

3 contributions with a lot of DB queries! Please help reduce them!


dix4life

Recommended Posts

Hello,

 

I've 3 big queries in my shop. Is there someone how can rewrite the contributions? This will be for all users here a great solution! I've installed a querie read tool so i can see on every page how many queries and wich queries are beeing loaded.

 

1. select specials_new_products_price from specials where products_id = '7230' and status

This Is the standard special price querie from Oscommerce i believe. I got this on the products_new.php page. The querie loads for EACH product again. So i have 20 queries for loading on the special price. All products have normaling pricing.

 

2. I have installed this contribution: http://addons.oscommerce.com/info/2251 I've allready installed the querie reduce contri for the categories. But this contri for an advanced search box on every page also loads the categorie querie. select c.categories_id, cd.categories_name from categories c, categories_description cd where parent_id = '31' and c.categories_id = cd.categories_id and cd.language_id = '4' order by sort_order, cd.categories_name. In my case an extra 35 queries on every page!!! Can someone please look at this beautyfull contri and make it less querie needed please? Thanks!

 

3. The last contri i have installed how loads a lot of queries is http://addons.oscommerce.com/info/6674. This is also a very nice contri but also takes a lot of queries! I think this is also a simple mod to get the querie count less.

 

I hope someone can help us to rewrite some code to minimize the querie counts. Thanks in advanced all of you!

 

Best regards,

 

Martin

Link to comment
Share on other sites

You should be trying to reduce the total query time, not the number of queries. Several small queries may be faster than one big one, so reducing the number of queries may actually make your pages slower. I would start with the slowest query and see what I could do to optimize it.

 

Regards

Jim

See my profile for a list of my addons and ways to get support.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...