-
could you help us?
hello, that server supplier was down our website, they said our database is overload, detail info:
" Here is a copy of the queries that have caused the overload:
1.Time: 36% (3252 sec)
Amount: 36% (259 queries)
Rows Examined/Sent: 739021733 / 7770
Avg. Query Exec/Lock Time: 12 / 0 sec.
Used databases: [chuangr_shop]
Query example: select p.products_quantity, p.products_model, p.products_image, p.products_weight, p.products_id, pd.products_name, p.products_image, p.products_price, p.products_tax_class_id, if(s.status, s.specials_new_products_price, null) as specials_new_products_price, p.products_date_added, m.manufacturers_name from products p left join manufacturers m on p.manufacturers_id = m.manufacturers_id left join products_description pd on p.products_id = pd.products_id and pd.language_id = '1' left join specials s on p.products_id = s.products_id where p.products_status = '1' and (p.products_price >= 1.00 and p.products_price < 10.00) order by p.prod ... [too long]
2.Time: 32% (2890 sec)
Amount: 32% (231 queries)
Rows Examined/Sent: 659107516 / 231
Avg. Query Exec/Lock Time: 12 / 0 sec.
Used databases: [chuangr_shop]
Query example: use chuangr_shop; select count(p.products_id) as total from products p left join manufacturers m on p.manufacturers_id = m.manufacturers_id left join products_description pd on p.products_id = pd.products_id and pd.language_id = '1' left join specials s on p.products_id = s.products_id where p.products_status = '1' and (p.products_price >= 1.00 and p.products_price < 10.00);
3.Time: 13% (1214 sec)
Amount: 12% (87 queries)
Rows Examined/Sent: 121595887 / 2227
Avg. Query Exec/Lock Time: 13 / 0 sec.
Used databases: [chuangr_shop]
Query example: use chuangr_shop; select distinct p.products_quantity, p.products_model, p.products_image, p.products_weight, m.manufacturers_id, p.products_id, pd.products_name, p.products_price, p.products_tax_class_id, if(s.status, s.specials_new_products_price, null) as specials_new_products_price, if(s.status, s.specials_new_products_price, p.products_price) as final_price from products p left join manufacturers m using(manufacturers_id) inner join products_description pd on p.products_id=pd.products_id left join specials s on p.products_id = s.products_id inner join products_to_categories p2c on p.products_id=p2c.products_id inner join catego ... [too long]
4.Time: 10% (951 sec)
Amount: 11% (85 queries)
Rows Examined/Sent: 184806784 / 510
Avg. Query Exec/Lock Time: 11 / 0 sec.
Used databases: [chuangr_shop]
Query example: use chuangr_shop; select distinct p.products_id, p.products_image, p.products_tax_class_id, s.status as specstat, s.specials_new_products_price, p.products_price, pd.products_description, pd.products_name from products p inner join products_description pd on p.products_id=pd.products_id left join specials s on p.products_id = s.products_id inner join products_to_categories p2c on p.products_id=p2c.products_id inner join categories c on p2c.categories_id=p2c.categories_id left join featured f on p.products_id = f.products_id where c.parent_id = '239' and p.products_status = '1' and f.status = '1' order by rand() DESC limit 6;
5.Time: 3% (288 sec)
Amount: 2% (18 queries)
Rows Examined/Sent: 34687322 / 18
Avg. Query Exec/Lock Time: 16 / 0 sec.
Used databases: [chuangr_shop]
Query example: use chuangr_shop; select count(distinct p.products_id) as total from products p left join manufacturers m using(manufacturers_id) inner join products_description pd on p.products_id=pd.products_id left join specials s on p.products_id = s.products_id inner join products_to_categories p2c on p.products_id=p2c.products_id inner join categories c on p2c.categories_id = c.categories_id where p.products_status = '1' and pd.language_id = '1' and ((pd.products_name like '%rice%' or p.products_model like '%rice%' or m.manufacturers_name like '%rice%' or pd.products_description like '%rice%') );
6.Time: 1% (145 sec)
Amount: 2% (16 queries)
Rows Examined/Sent: 377729 / 281
Avg. Query Exec/Lock Time: 9 / 0 sec.
Used databases: [chuangr_shop]
Query example: use chuangr_shop; select distinct p.products_id, pd.products_name from products p, products_description pd, products_to_categories p2c, categories c where p.products_status = '1' and p.products_ordered > 0 and p.products_id = pd.products_id and pd.language_id = '4' and p.products_id = p2c.products_id and p2c.categories_id = c.categories_id and '232' in (c.categories_id, c.parent_id) order by p.products_ordered desc, pd.products_name limit 18;
Database chuangr_shop was chmoded to 0.
Please remove or optimize these queries. Once this is done, we will be happy to re enable your database access. "
please help us.
xingsheng
-
I would suggest checking your JOINS. Example that last query is pulling from 4 different tables & there is no JOIN. There must be something that those tables have in common.
You might also put a limit on the number of records returned... SELECT TOP 1000, untill you get this sorted out so that you can get the scripts re-enabled.