Advertisement
fablau1211

Untitled

Dec 7th, 2020
63
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.00 KB | None | 0 0
  1. [MariaDB [virtualsheetmusic]> explain format=json select a.* from HLAsset a where a.excluded=0 AND a.date_deleted='' AND a.filetype='SCORCH' AND EXISTS (SELECT 1 FROM HLAssetCategory WHERE asset_id = a.asset_id);
  2. +------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  3. | EXPLAIN |
  4. +------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  5. | {
  6. "query_block": {
  7. "select_id": 1,
  8. "table": {
  9. "table_name": "a",
  10. "access_type": "ref",
  11. "possible_keys": ["covering"],
  12. "key": "covering",
  13. "key_length": "103",
  14. "used_key_parts": ["excluded", "date_deleted", "filetype"],
  15. "ref": ["const", "const", "const"],
  16. "rows": 149991,
  17. "filtered": 100,
  18. "index_condition": "a.date_deleted = '' and a.filetype = 'SCORCH'"
  19. },
  20. "table": {
  21. "table_name": "<subquery2>",
  22. "access_type": "eq_ref",
  23. "possible_keys": ["distinct_key"],
  24. "key": "distinct_key",
  25. "key_length": "35",
  26. "used_key_parts": ["asset_id"],
  27. "ref": ["func"],
  28. "rows": 1,
  29. "filtered": 100,
  30. "materialized": {
  31. "unique": 1,
  32. "query_block": {
  33. "select_id": 2,
  34. "table": {
  35. "table_name": "HLAssetCategory",
  36. "access_type": "index",
  37. "possible_keys": ["PRIMARY"],
  38. "key": "PRIMARY",
  39. "key_length": "38",
  40. "used_key_parts": ["asset_id", "category_id"],
  41. "rows": 625536,
  42. "filtered": 100,
  43. "using_index": true
  44. }
  45. }
  46. }
  47. }
  48. }
  49. } |
  50. +------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  51. 1 row in set (0.004 sec)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement