Guest User

Untitled

a guest
Aug 17th, 2021
100
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
MySQL 3.51 KB | None | 0 0
  1. 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
  2. *************************** 1. row ***************************
  3.            id: 1
  4.   select_type: SIMPLE
  5.         table: <subquery2>
  6.    partitions: NULL
  7.          type: ALL
  8. possible_keys: NULL
  9.           key: NULL
  10.       key_len: NULL
  11.           ref: NULL
  12.          rows: NULL
  13.      filtered: 100.00
  14.         Extra: Using temporary; Using filesort
  15. *************************** 2. row ***************************
  16.            id: 1
  17.   select_type: SIMPLE
  18.         table: gs
  19.    partitions: NULL
  20.          type: ref
  21. possible_keys: unique_ids,best_thumb,gallery_id,thumb_id,activation_date,duration,test_priority,tested_thumb_index,group_id,group_activationdate
  22.           key: unique_ids
  23.       key_len: 6
  24.           ref: <subquery2>.gallery_id,const
  25.          rows: 3
  26.      filtered: 50.00
  27.         Extra: Using where
  28. *************************** 3. row ***************************
  29.            id: 1
  30.   select_type: SIMPLE
  31.         table: gd
  32.    partitions: NULL
  33.          type: ALL
  34. possible_keys: PRIMARY
  35.           key: NULL
  36.       key_len: NULL
  37.           ref: NULL
  38.          rows: 392724
  39.      filtered: 0.00
  40.         Extra: Using where; Using join buffer (Block Nested Loop)
  41. *************************** 4. row ***************************
  42.            id: 1
  43.   select_type: SIMPLE
  44.         table: gi
  45.    partitions: NULL
  46.          type: eq_ref
  47. possible_keys: PRIMARY,sponsor_id,gallery_type,gallery_status
  48.           key: PRIMARY
  49.       key_len: 4
  50.           ref: <subquery2>.gallery_id
  51.          rows: 1
  52.      filtered: 22.50
  53.         Extra: Using where
  54. *************************** 5. row ***************************
  55.            id: 1
  56.   select_type: SIMPLE
  57.         table: gt
  58.    partitions: NULL
  59.          type: eq_ref
  60. possible_keys: PRIMARY
  61.           key: PRIMARY
  62.       key_len: 4
  63.           ref: xhamstermania_com_scj.gs.thumb_id
  64.          rows: 1
  65.      filtered: 100.00
  66.         Extra: NULL
  67. *************************** 6. row ***************************
  68.            id: 1
  69.   select_type: SIMPLE
  70.         table: rot_gal2tag
  71.    partitions: NULL
  72.          type: ref
  73. possible_keys: gallery_id
  74.           key: gallery_id
  75.       key_len: 4
  76.           ref: <subquery2>.gallery_id
  77.          rows: 15
  78.      filtered: 100.00
  79.         Extra: Using index
  80. *************************** 7. row ***************************
  81.            id: 2
  82.   select_type: MATERIALIZED
  83.         table: rot_gal2tag
  84.    partitions: NULL
  85.          type: ref
  86. possible_keys: tag_id,gallery_id
  87.           key: tag_id
  88.       key_len: 4
  89.           ref: const
  90.          rows: 140194
  91.      filtered: 100.00
  92.         Extra: NULL
  93. 7 rows in set, 1 warning (0.01 sec)
Advertisement
Add Comment
Please, Sign In to add comment