Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- mysql> explain SELECT SQL_CALC_FOUND_ROWS 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, gs.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_info as gi on gi.gallery_id = gs.gallery_id JOIN rot_gallery_data19 as gd on gd.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 ('3') and gs.group_id = 0 AND gs.gallery_id IN (SELECT gallery_id FROM rot_gal2tag WHERE tag_id IN ('20537') ) group by gs.gallery_id, gs.thumb_id ORDER BY tested_thumb DESC, gs.total_ctr DESC LIMIT 1500, 60\G
- *************************** 1. row ***************************
- id: 1
- select_type: SIMPLE
- table: <subquery2>
- partitions: NULL
- type: ALL
- possible_keys: NULL
- key: NULL
- key_len: NULL
- ref: NULL
- rows: NULL
- filtered: 100.00
- Extra: Using temporary; Using filesort
- *************************** 2. row ***************************
- id: 1
- select_type: SIMPLE
- table: gs
- partitions: NULL
- type: ref
- possible_keys: unique_ids,best_thumb,gallery_id,thumb_id,activation_date,duration,test_priority,tested_thumb_index,group_id,group_activationdate
- key: unique_ids
- key_len: 6
- ref: <subquery2>.gallery_id,const
- rows: 3
- filtered: 50.00
- Extra: Using where
- *************************** 3. row ***************************
- id: 1
- select_type: SIMPLE
- table: gd
- partitions: NULL
- type: ALL
- possible_keys: PRIMARY
- key: NULL
- key_len: NULL
- ref: NULL
- rows: 392724
- filtered: 0.00
- Extra: Using where; Using join buffer (Block Nested Loop)
- *************************** 4. row ***************************
- id: 1
- select_type: SIMPLE
- table: gi
- partitions: NULL
- type: eq_ref
- possible_keys: PRIMARY,sponsor_id,gallery_type,gallery_status
- key: PRIMARY
- key_len: 4
- ref: <subquery2>.gallery_id
- rows: 1
- filtered: 22.50
- Extra: Using where
- *************************** 5. row ***************************
- id: 1
- select_type: SIMPLE
- table: gt
- partitions: NULL
- type: eq_ref
- possible_keys: PRIMARY
- key: PRIMARY
- key_len: 4
- ref: xhamstermania_com_scj.gs.thumb_id
- rows: 1
- filtered: 100.00
- Extra: NULL
- *************************** 6. row ***************************
- id: 1
- select_type: SIMPLE
- table: rot_gal2tag
- partitions: NULL
- type: ref
- possible_keys: gallery_id
- key: gallery_id
- key_len: 4
- ref: <subquery2>.gallery_id
- rows: 15
- filtered: 100.00
- Extra: Using index
- *************************** 7. row ***************************
- id: 2
- select_type: MATERIALIZED
- table: rot_gal2tag
- partitions: NULL
- type: ref
- possible_keys: tag_id,gallery_id
- key: tag_id
- key_len: 4
- ref: const
- rows: 140194
- filtered: 100.00
- Extra: NULL
- 7 rows in set, 1 warning (0.01 sec)
Advertisement
Add Comment
Please, Sign In to add comment