Advertisement
Guest User

Untitled

a guest
Dec 17th, 2012
110
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.83 KB | None | 0 0
  1. mysql> explain SELECT * FROM tvshowview WHERE (tvshowview.idShow IN (select tvshowview.idShow from tvshowview where (watchedcount > 0 AND watchedcount < totalCount) OR (watchedcount = 0 AND tvshowview.idShow IN (select episodeview.idShow from episodeview WHERE episodeview.idShow = tvshowview.idShow AND episodeview.resumeTimeInSeconds > 0))));
  2. +----+--------------------+----------------+--------+------------------------------------+---------------------+---------+-------------------------------------------------+------+--------------------------+
  3. | id | select_type | table | type | possible_keys | key | key_len | ref | rows | Extra |
  4. +----+--------------------+----------------+--------+------------------------------------+---------------------+---------+-------------------------------------------------+------+--------------------------+
  5. | 1 | PRIMARY | <derived4> | ALL | NULL | NULL | NULL | NULL | 175 | Using where |
  6. | 4 | DERIVED | tvshow | ALL | NULL | NULL | NULL | NULL | 173 | Using filesort |
  7. | 4 | DERIVED | tvshowlinkpath | ref | ix_tvshowlinkpath_1 | ix_tvshowlinkpath_1 | 5 | MyVideos75.tvshow.idShow | 1 | Using index |
  8. | 4 | DERIVED | path | eq_ref | PRIMARY | PRIMARY | 4 | MyVideos75.tvshowlinkpath.idPath | 1 | |
  9. | 4 | DERIVED | episode | ref | ix_episode_show2 | ix_episode_show2 | 5 | MyVideos75.tvshow.idShow | 24 | |
  10. | 4 | DERIVED | files | eq_ref | PRIMARY | PRIMARY | 4 | MyVideos75.episode.idFile | 1 | |
  11. | 2 | DEPENDENT SUBQUERY | <derived5> | ALL | NULL | NULL | NULL | NULL | 175 | Using where |
  12. | 5 | DERIVED | tvshow | ALL | NULL | NULL | NULL | NULL | 173 | Using filesort |
  13. | 5 | DERIVED | tvshowlinkpath | ref | ix_tvshowlinkpath_1 | ix_tvshowlinkpath_1 | 5 | MyVideos75.tvshow.idShow | 1 | Using index |
  14. | 5 | DERIVED | path | eq_ref | PRIMARY | PRIMARY | 4 | MyVideos75.tvshowlinkpath.idPath | 1 | |
  15. | 5 | DERIVED | episode | ref | ix_episode_show2 | ix_episode_show2 | 5 | MyVideos75.tvshow.idShow | 24 | |
  16. | 5 | DERIVED | files | eq_ref | PRIMARY | PRIMARY | 4 | MyVideos75.episode.idFile | 1 | |
  17. | 3 | DEPENDENT SUBQUERY | episode | ref | id_episode_file_2,ix_episode_show2 | ix_episode_show2 | 5 | func | 24 | Using where |
  18. | 3 | DEPENDENT SUBQUERY | tvshow | eq_ref | PRIMARY | PRIMARY | 4 | MyVideos75.episode.idShow | 1 | Using index |
  19. | 3 | DEPENDENT SUBQUERY | bookmark | ref | ix_bookmark | ix_bookmark | 10 | MyVideos75.episode.idFile,const | 1 | Using where |
  20. | 3 | DEPENDENT SUBQUERY | seasons | ref | ix_seasons | ix_seasons | 10 | MyVideos75.tvshow.idShow,MyVideos75.episode.c12 | 1 | Using index |
  21. | 3 | DEPENDENT SUBQUERY | files | eq_ref | PRIMARY,ix_files | PRIMARY | 4 | MyVideos75.episode.idFile | 1 | |
  22. | 3 | DEPENDENT SUBQUERY | path | eq_ref | PRIMARY | PRIMARY | 4 | MyVideos75.files.idPath | 1 | Using where; Using index |
  23. +----+--------------------+----------------+--------+------------------------------------+---------------------+---------+-------------------------------------------------+------+--------------------------+
  24. 18 rows in set (0.92 sec)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement