чето медленных запросов стало ну очень много.
Code: Select all
# Query_time: 4.445392 Lock_time: 0.006007 Rows_sent: 80 Rows_examined: 244450
use ;
SET timestamp=1473284728;
SELECT gs.gallery_id, gs.thumb_id, gi.sponsor_id, gi.content_count, gi.content_type, gs.total_shows, gs.total_clicks, gs.total_ctr, gt.thumb_url, gd.*, gi.content_count, gi.crop_profile_id, gi.activation_date, gi.added_date, gi.duration, gi.url, gi.gallery_total_shows, gi.sponsor_id, gi.source_url, gi.custom_gallery FROM rot_gallery_stats54 as gs JOIN rot_gallery_data45 as gd on gd.gallery_id = gs.gallery_id
JOIN rot_gallery_info as gi on gi.gallery_id = gs.gallery_id JOIN rot_thumbs as gt on gt.thumb_id = gs.thumb_id
WHERE 1 = 1 AND gi.gallery_status = 'active' AND gi.gallery_type = 0 and gs.best_thumb = 'yes' and gi.sponsor_id NOT IN (4) and gs.group_id = 0 ORDER BY tested_thumb DESC, gs.total_ctr DESC LIMIT 160, 80# queryitems;
# Time: 160908 0:45:29
# User@Host: [] @ localhost []
# Query_time: 6.854383 Lock_time: 0.053393 Rows_sent: 24 Rows_examined: 107692
use ;
SET timestamp=1473284729;
SELECT DISTINCT(gs.gallery_id), gs.thumb_id, gi.sponsor_id, gi.content_count, gi.content_type, gs.total_shows, gs.total_clicks, gs.total_ctr, gt.thumb_url, gd.*, gi.content_count, gi.crop_profile_id, gi.activation_date, gi.added_date, gi.duration, gi.url, gi.gallery_total_shows, gi.sponsor_id, gi.source_url, gi.custom_gallery FROM rot_gallery_stats1 as gs JOIN rot_gallery_data1 as gd on gd.gallery_id = gs.gallery_id
JOIN rot_gallery_info as gi on gi.gallery_id = gs.gallery_id JOIN rot_thumbs as gt on gt.thumb_id = gs.thumb_id
WHERE 1 = 1 AND gi.gallery_status = 'active' AND gi.gallery_type = 0 and gs.best_thumb = 'yes' and gs.group_id IN (259) AND gs.gallery_id NOT IN ('214013') ORDER BY tested_thumb DESC, gs.total_ctr DESC LIMIT 72, 24# queryitems;
# Time: 160908 0:45:31
# User@Host: [] @ localhost []
# Query_time: 6.308397 Lock_time: 0.000207 Rows_sent: 20 Rows_examined: 450944
use ;
SET timestamp=1473284731;
SELECT DISTINCT(gs.gallery_id), gs.thumb_id, gi.sponsor_id, gi.content_count, gi.content_type, gs.total_shows, gs.total_clicks, gs.total_ctr, gt.thumb_url, gd.*, gi.content_count, gi.crop_profile_id, gi.activation_date, gi.added_date, gi.duration, gi.url, gi.gallery_total_shows, gi.sponsor_id, gi.source_url, gi.custom_gallery FROM rot_gallery_stats15 as gs STRAIGHT_JOIN rot_gallery_data1 as gd on gd.gallery_id = gs.gallery_id
STRAIGHT_JOIN rot_gallery_info as gi on gi.gallery_id = gs.gallery_id
JOIN rot_gal2tag on rot_gal2tag.gallery_id = gs.gallery_id
JOIN rot_thumbs as gt on gt.thumb_id = gs.thumb_id
WHERE 1 = 1 AND gi.gallery_status = 'active' AND gi.gallery_type = 0 and gs.best_thumb = 'yes' and gi.sponsor_id NOT IN (2,5,3) and gs.group_id = 0 AND rot_gal2tag.tag_id IN ('2','3','8775','275','65','63','8790','257','17','9134','308') AND gs.gallery_id NOT IN ('34098','34098','26747','39906','39166','15524','20410','20410','34653','22331','26747','39899','26747','20410','37631','14110','20073','13056','14882','39386','34098','39836','34098','34098','11329','39259','14096','39904','39150','26747','10616','35983','39099','38278','39899','38092','34653','19204','11509','10034','18423','28557','30717','14492','18334','30075') ORDER BY tested_thumb DESC, gs.total_ctr DESC LIMIT 100, 20# queryitems;
# User@Host: [] @ localhost []
# Query_time: 9.370747 Lock_time: 0.075084 Rows_sent: 40 Rows_examined: 358612
use ;
SET timestamp=1473284731;
SELECT DISTINCT(gs.gallery_id), gs.thumb_id, gi.sponsor_id, gi.content_count, gi.content_type, gs.total_shows, gs.total_clicks, gs.total_ctr, gt.thumb_url, gd.*, gi.content_count, gi.crop_profile_id, gi.activation_date, gi.added_date, gi.duration, gi.url, gi.gallery_total_shows, gi.sponsor_id, gi.source_url, gi.custom_gallery FROM rot_gallery_stats55 as gs STRAIGHT_JOIN rot_gallery_data48 as gd on gd.gallery_id = gs.gallery_id
STRAIGHT_JOIN rot_gallery_info as gi on gi.gallery_id = gs.gallery_id
JOIN rot_gal2tag on rot_gal2tag.gallery_id = gs.gallery_id
JOIN rot_thumbs as gt on gt.thumb_id = gs.thumb_id
WHERE 1 = 1 AND gi.gallery_status = 'active' AND gi.gallery_type = 0 and gs.best_thumb = 'yes' and gi.sponsor_id NOT IN (5,3) and gs.group_id = 0 AND rot_gal2tag.tag_id IN ('21','29','123','154','290','741','746','761','901','962','1124','1262','1328','1479','1502','1919','1997','2081','3983','3984') AND gs.gallery_id NOT IN ('5160') ORDER BY tested_thumb DESC, gs.total_ctr DESC LIMIT 160, 40# queryitems;
# Time: 160908 0:45:32
# User@Host: [] @ localhost []
# Query_time: 9.519942 Lock_time: 0.123219 Rows_sent: 70 Rows_examined: 348476
SET timestamp=1473284732;