Queries Overloading Server
I just had an account banned for excessive MySQL queries - totalling 2000 per single page view. I think it has something to do with the number of options available on some products. Is there any way to minimize the number of queries while still keeping those options available?
15 Query select master_categories_id from products where products_id = '9'
15 Query select sale_specials_condition, sale_deduction_value, sale_deduction_type from salemaker_sales where sale_categories_all like '%,4,%' and sale_status = '1' and (sale_date_start <= now() or sale_date_start = '0001-01-01') and (sale_date_end >= now() or sale_date_end = '0001-01-01') and (sale_pricerange_from <= '0.0000' or sale_pricerange_from = '0') and (sale_pricerange_to >= '0.0000' or sale_pricerange_to = '0')
15 Query select options_id from products_attributes where products_attributes_id='888'
15 Query select products_options_type from products_options where products_options_id='16'
15 Query select products_attributes_filename, products_attributes_maxdays, products_attributes_maxcount
15 Query select max(products_attributes_id) + 1
15 Query select products_model
15 Query select products_name
15 Query select * from products_options
15 Query select * from products_options_values
15 Query select products_options_id
15 Query select products_options_name
15 Query select products_options_id
15 Query select products_options_name
15 Query select products_options_id
15 Query select products_options_name
15 Query select products_options_id
15 Query select products_options_name
15 Query select products_options_id
15 Query select products_options_name
15 Query select products_options_id
15 Query select products_options_name
15 Query select products_options_id
15 Query select products_options_name
15 Query select products_options_id
15 Query select products_options_name
15 Query select products_options_id
15 Query select products_options_name
15 Query select products_options_id
15 Query select products_options_name
15 Query select products_options_id
15 Query select products_options_name
15 Query select products_options_id
15 Query select products_options_name
15 Query select products_options_id
15 Query select products_options_name
15 Query select products_options_id
15 Query select products_options_name
15 Query select products_options_id
15 Query select products_options_name
15 Query select products_options_id
15 Query select products_options_name
15 Query select products_options_id
15 Query select products_options_name
15 Query select products_options_id
15 Query select products_options_name
15 Query select products_options_id
15 Query select products_options_name
15 Query select products_options_id
15 Query select products_options_name
15 Query select products_options_id
15 Query select products_options_name
15 Query select products_options_id
15 Query select products_options_name
15 Query select products_options_id
15 Query select products_options_name
15 Query select products_options_id
15 Query select products_options_name
15 Query select products_options_id
15 Query select products_options_name
15 Query select products_options_id
15 Query select products_options_name
15 Query select products_options_id
15 Query select products_options_name
15 Query select products_options_id
15 Query select products_options_name
15 Query select products_options_id
15 Query select products_options_name
15 Query select products_options_id
15 Query select products_options_name
15 Query select products_options_id
15 Query select products_options_name
15 Query select products_options_id
15 Query select products_options_name
15 Query select products_options_id
15 Query select products_options_name
15 Query select products_options_id
15 Query select products_options_name
15 Query select products_options_id
15 Query select products_options_name
15 Query select products_options_id
15 Query select products_options_name
15 Query select products_options_id
15 Query select products_options_name
15 Query select products_options_id
15 Query select products_options_name
15 Query select products_options_id
15 Query select products_options_name
15 Query select products_options_id
15 Query select products_options_name
15 Query select products_options_id
15 Query select products_options_name
15 Query select products_options_id
15 Query select products_options_name
15 Query select products_options_id
15 Query select products_options_name
15 Query select products_options_id
15 Query select products_options_name
15 Query select products_options_id
15 Query select products_options_name
15 Query select products_options_id
15 Query select products_options_name
15 Query select products_options_id
15 Query select products_options_name
15 Query select products_options_id
15 Query select products_options_name
15 Query select products_options_id
15 Query select products_options_name
15 Query select products_options_id
15 Query select products_options_name
15 Query select products_options_id
15 Query select products_options_name
15 Query select products_options_id
15 Query select products_options_name
15 Query select products_options_id
Re: Queries Overloading Server
what version of zen cart are you using?
there isnt a solution at this time,.
wilt has said that in the next major release that the db querries are going to be much smaller...
Re: Queries Overloading Server
The host is reporting that even with category counts disabled, the number of options and values queries are still in the range of 200 on single page.
As for the version, I can't double check, but I thought it was 1.3... this is what's in the index.php file
// $Id: index.php 1591 2005-07-15 19:57:46Z ajeh $
I'm having them check the version number in install.txt
Re: Queries Overloading Server
Looks like 1.2.6 - are there improvements in 1.3?
Re: Queries Overloading Server
Yes as the tables are indexed better.
I have customers that have tons of products in tons of categories with loads of options and we dont really have this issue....
Who is your host?
Re: Queries Overloading Server
Dathorn.
I have a grep of the queries that are being run that I could show you, but I can't attach files and its too long to post in this message (10000 character limit).
Re: Queries Overloading Server
Now having upgraded to 1.3...
I'm getting:
Fatal error: main(): Failed opening required '' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /includes/templates/custom/templates/tpl_index_categories.php on line 45
On the index page.
Warning: main(DIR_WS_BLOCKSblk_address_format_us.php): failed to open stream: No such file or directory in ./includes/templates/custom/templates/tpl_login_default.php on line 194
Warning: main(DIR_WS_BLOCKSblk_address_format_us.php): failed to open stream: No such file or directory in ./includes/templates/custom/templates/tpl_login_default.php on line 194
Fatal error: main(): Failed opening required 'DIR_WS_BLOCKSblk_address_format_us.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /includes/templates/custom/templates/tpl_login_default.php on line 194
On the login page.....
and none of the products are showing up in the categories - even though they're all showing up and active in the admin.
Re: Queries Overloading Server
Please tell me you didnt upgrade a live site
Re: Queries Overloading Server
change your hosting
it is better solution
Re: Queries Overloading Server
The site is still in development, its not live. I have backups of the database and all files.
Changing the host is not an option at this point, but I am considering it in the future.