Advertisement
Guest User

Untitled

a guest
Nov 18th, 2012
60
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.21 KB | None | 0 0
  1. mysql> explain select id
  2. -> from file
  3. -> where size in
  4. -> (
  5. -> select size from
  6. -> (
  7. -> select count(*) as c, size
  8. -> from file
  9. -> group by size
  10. -> having c>1 and size>0
  11. -> ) as t
  12. -> );
  13. +----+--------------------+------------+-------+---------------+----------+-----
  14. ----+------+-------+--------------------------+
  15. | id | select_type | table | type | possible_keys | key | key_
  16. len | ref | rows | Extra |
  17. +----+--------------------+------------+-------+---------------+----------+-----
  18. ----+------+-------+--------------------------+
  19. | 1 | PRIMARY | file | index | NULL | filesize | 8
  20. | NULL | 21168 | Using where; Using index |
  21. | 2 | DEPENDENT SUBQUERY | <derived3> | ALL | NULL | NULL | NULL
  22. | NULL | 2813 | Using where |
  23. | 3 | DERIVED | file | index | NULL | filesize | 8
  24. | NULL | 21168 | Using index |
  25. +----+--------------------+------------+-------+---------------+----------+-----
  26. ----+------+-------+--------------------------+
  27. 3 rows in set (0.01 sec)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement