Advertisement
Guest User

Explain MySQL

a guest
Feb 18th, 2022
117
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
JSON 15.45 KB | None | 0 0
  1. {
  2.   "query_block": {
  3.     "select_id": 1,
  4.     "cost_info": {
  5.       "query_cost": "778.49"
  6.     },
  7.     "nested_loop": [
  8.       {
  9.         "table": {
  10.           "table_name": "tst_batch",
  11.           "access_type": "ALL",
  12.           "rows_examined_per_scan": 32,
  13.           "rows_produced_per_join": 3,
  14.           "filtered": "10.00",
  15.           "cost_info": {
  16.             "read_cost": "3.13",
  17.             "eval_cost": "0.32",
  18.             "prefix_cost": "3.45",
  19.             "data_read_per_join": "3K"
  20.           },
  21.           "used_columns": [
  22.             "created_at",
  23.             "updated_at",
  24.             "id",
  25.             "organisation_id",
  26.             "name",
  27.             "created_date",
  28.             "expected_start_date",
  29.             "expected_finish_date",
  30.             "end_date",
  31.             "version_number",
  32.             "type"
  33.           ],
  34.           "attached_condition": "(`reference`.`tst_batch`.`end_date` is null)"
  35.         }
  36.       },
  37.       {
  38.         "table": {
  39.           "table_name": "tst_batch_test_case_1",
  40.           "access_type": "ref",
  41.           "possible_keys": [
  42.             "batch_id"
  43.           ],
  44.           "key": "batch_id",
  45.           "used_key_parts": [
  46.             "batch_id"
  47.           ],
  48.           "key_length": "4",
  49.           "ref": [
  50.             "reference.tst_batch.id"
  51.           ],
  52.           "rows_examined_per_scan": 21,
  53.           "rows_produced_per_join": 68,
  54.           "filtered": "100.00",
  55.           "cost_info": {
  56.             "read_cost": "17.13",
  57.             "eval_cost": "6.85",
  58.             "prefix_cost": "27.43",
  59.             "data_read_per_join": "420K"
  60.           },
  61.           "used_columns": [
  62.             "created_at",
  63.             "updated_at",
  64.             "id",
  65.             "batch_id",
  66.             "assign_id",
  67.             "tc_code",
  68.             "tc_name",
  69.             "tc_created_for_version",
  70.             "tc_family_name",
  71.             "tc_sub_family_name",
  72.             "tc_sub_sub_family_name",
  73.             "tc_criticality"
  74.           ]
  75.         }
  76.       },
  77.       {
  78.         "table": {
  79.           "table_name": "tst_batch_step_1",
  80.           "access_type": "ref",
  81.           "possible_keys": [
  82.             "batch_test_case_id"
  83.           ],
  84.           "key": "batch_test_case_id",
  85.           "used_key_parts": [
  86.             "batch_test_case_id"
  87.           ],
  88.           "key_length": "4",
  89.           "ref": [
  90.             "reference.tst_batch_test_case_1.id"
  91.           ],
  92.           "rows_examined_per_scan": 31,
  93.           "rows_produced_per_join": 2145,
  94.           "filtered": "100.00",
  95.           "cost_info": {
  96.             "read_cost": "536.48",
  97.             "eval_cost": "214.59",
  98.             "prefix_cost": "778.49",
  99.             "data_read_per_join": "57M"
  100.           },
  101.           "used_columns": [
  102.             "created_at",
  103.             "updated_at",
  104.             "id",
  105.             "batch_test_case_id",
  106.             "s_step_number",
  107.             "s_menu1",
  108.             "s_menu2",
  109.             "s_menu3",
  110.             "s_menu4",
  111.             "s_menu5",
  112.             "s_do",
  113.             "s_what_where1",
  114.             "s_what_where2",
  115.             "s_what_where3",
  116.             "s_what_where4",
  117.             "s_what_where5",
  118.             "s_what_where6",
  119.             "s_what_where7",
  120.             "s_what_where8",
  121.             "s_action1",
  122.             "s_action2",
  123.             "s_file_to_upload",
  124.             "s_close_window",
  125.             "s_open_window",
  126.             "s_look1",
  127.             "s_look2",
  128.             "s_link_img",
  129.             "s_validate_input",
  130.             "s_available_actions",
  131.             "s_available_values",
  132.             "s_status",
  133.             "s_comment",
  134.             "s_screenshot_link",
  135.             "s_completion_date"
  136.           ]
  137.         }
  138.       }
  139.     ],
  140.     "select_list_subqueries": [
  141.       {
  142.         "dependent": true,
  143.         "cacheable": false,
  144.         "query_block": {
  145.           "select_id": 8,
  146.           "cost_info": {
  147.             "query_cost": "3.39"
  148.           },
  149.           "table": {
  150.             "table_name": "tst_batch_step",
  151.             "access_type": "ref",
  152.             "possible_keys": [
  153.               "batch_test_case_id"
  154.             ],
  155.             "key": "batch_test_case_id",
  156.             "used_key_parts": [
  157.               "batch_test_case_id"
  158.             ],
  159.             "key_length": "4",
  160.             "ref": [
  161.               "reference.tst_batch_test_case_1.id"
  162.             ],
  163.             "rows_examined_per_scan": 31,
  164.             "rows_produced_per_join": 31,
  165.             "filtered": "100.00",
  166.             "using_index": true,
  167.             "cost_info": {
  168.               "read_cost": "0.26",
  169.               "eval_cost": "3.13",
  170.               "prefix_cost": "3.39",
  171.               "data_read_per_join": "859K"
  172.             },
  173.             "used_columns": [
  174.               "batch_test_case_id",
  175.               "s_step_number"
  176.             ]
  177.           }
  178.         }
  179.       },
  180.       {
  181.         "dependent": true,
  182.         "cacheable": false,
  183.         "query_block": {
  184.           "select_id": 6,
  185.           "cost_info": {
  186.             "query_cost": "237.66"
  187.           },
  188.           "nested_loop": [
  189.             {
  190.               "table": {
  191.                 "table_name": "tst_batch_test_case",
  192.                 "access_type": "ref",
  193.                 "possible_keys": [
  194.                   "batch_id"
  195.                 ],
  196.                 "key": "batch_id",
  197.                 "used_key_parts": [
  198.                   "batch_id"
  199.                 ],
  200.                 "key_length": "4",
  201.                 "ref": [
  202.                   "reference.tst_batch.id"
  203.                 ],
  204.                 "rows_examined_per_scan": 21,
  205.                 "rows_produced_per_join": 21,
  206.                 "filtered": "100.00",
  207.                 "using_index": true,
  208.                 "cost_info": {
  209.                   "read_cost": "0.82",
  210.                   "eval_cost": "2.14",
  211.                   "prefix_cost": "2.96",
  212.                   "data_read_per_join": "131K"
  213.                 },
  214.                 "used_columns": [
  215.                   "id",
  216.                   "batch_id"
  217.                 ]
  218.               }
  219.             },
  220.             {
  221.               "table": {
  222.                 "table_name": "tst_batch_step",
  223.                 "access_type": "ref",
  224.                 "possible_keys": [
  225.                   "batch_test_case_id"
  226.                 ],
  227.                 "key": "batch_test_case_id",
  228.                 "used_key_parts": [
  229.                   "batch_test_case_id"
  230.                 ],
  231.                 "key_length": "4",
  232.                 "ref": [
  233.                   "reference.tst_batch_test_case.id"
  234.                 ],
  235.                 "rows_examined_per_scan": 31,
  236.                 "rows_produced_per_join": 21,
  237.                 "filtered": "100.00",
  238.                 "not_exists": true,
  239.                 "cost_info": {
  240.                   "read_cost": "167.65",
  241.                   "eval_cost": "2.14",
  242.                   "prefix_cost": "237.67",
  243.                   "data_read_per_join": "587K"
  244.                 },
  245.                 "used_columns": [
  246.                   "batch_test_case_id",
  247.                   "s_status"
  248.                 ],
  249.                 "attached_condition": "(<if>(is_not_null_compl(tst_batch_step), (`reference`.`tst_batch_step`.`s_status` is null), true) and <if>(is_not_null_compl(tst_batch_step), <if>(found_match(tst_batch_step), false, true), true))"
  250.               }
  251.             }
  252.           ]
  253.         }
  254.       },
  255.       {
  256.         "dependent": true,
  257.         "cacheable": false,
  258.         "query_block": {
  259.           "select_id": 5,
  260.           "cost_info": {
  261.             "query_cost": "75.61"
  262.           },
  263.           "nested_loop": [
  264.             {
  265.               "table": {
  266.                 "table_name": "tst_batch_test_case",
  267.                 "access_type": "ref",
  268.                 "possible_keys": [
  269.                   "PRIMARY",
  270.                   "batch_id"
  271.                 ],
  272.                 "key": "batch_id",
  273.                 "used_key_parts": [
  274.                   "batch_id"
  275.                 ],
  276.                 "key_length": "4",
  277.                 "ref": [
  278.                   "reference.tst_batch.id"
  279.                 ],
  280.                 "rows_examined_per_scan": 21,
  281.                 "rows_produced_per_join": 21,
  282.                 "filtered": "100.00",
  283.                 "using_index": true,
  284.                 "cost_info": {
  285.                   "read_cost": "0.82",
  286.                   "eval_cost": "2.14",
  287.                   "prefix_cost": "2.96",
  288.                   "data_read_per_join": "131K"
  289.                 },
  290.                 "used_columns": [
  291.                   "id",
  292.                   "batch_id"
  293.                 ]
  294.               }
  295.             },
  296.             {
  297.               "table": {
  298.                 "table_name": "tst_batch_step",
  299.                 "access_type": "ref",
  300.                 "possible_keys": [
  301.                   "batch_test_case_id"
  302.                 ],
  303.                 "key": "batch_test_case_id",
  304.                 "used_key_parts": [
  305.                   "batch_test_case_id"
  306.                 ],
  307.                 "key_length": "4",
  308.                 "ref": [
  309.                   "reference.tst_batch_test_case.id"
  310.                 ],
  311.                 "rows_examined_per_scan": 31,
  312.                 "rows_produced_per_join": 670,
  313.                 "filtered": "100.00",
  314.                 "using_index": true,
  315.                 "cost_info": {
  316.                   "read_cost": "5.59",
  317.                   "eval_cost": "67.06",
  318.                   "prefix_cost": "75.61",
  319.                   "data_read_per_join": "17M"
  320.                 },
  321.                 "used_columns": [
  322.                   "id",
  323.                   "batch_test_case_id"
  324.                 ]
  325.               }
  326.             }
  327.           ]
  328.         }
  329.       },
  330.       {
  331.         "dependent": true,
  332.         "cacheable": false,
  333.         "query_block": {
  334.           "select_id": 4,
  335.           "cost_info": {
  336.             "query_cost": "2.96"
  337.           },
  338.           "table": {
  339.             "table_name": "tst_batch_test_case",
  340.             "access_type": "ref",
  341.             "possible_keys": [
  342.               "batch_id"
  343.             ],
  344.             "key": "batch_id",
  345.             "used_key_parts": [
  346.               "batch_id"
  347.             ],
  348.             "key_length": "4",
  349.             "ref": [
  350.               "reference.tst_batch.id"
  351.             ],
  352.             "rows_examined_per_scan": 21,
  353.             "rows_produced_per_join": 21,
  354.             "filtered": "100.00",
  355.             "using_index": true,
  356.             "cost_info": {
  357.               "read_cost": "0.82",
  358.               "eval_cost": "2.14",
  359.               "prefix_cost": "2.96",
  360.               "data_read_per_join": "131K"
  361.             },
  362.             "used_columns": [
  363.               "id",
  364.               "batch_id"
  365.             ]
  366.           }
  367.         }
  368.       },
  369.       {
  370.         "dependent": true,
  371.         "cacheable": false,
  372.         "query_block": {
  373.           "select_id": 3,
  374.           "cost_info": {
  375.             "query_cost": "237.66"
  376.           },
  377.           "nested_loop": [
  378.             {
  379.               "table": {
  380.                 "table_name": "tst_batch_test_case",
  381.                 "access_type": "ref",
  382.                 "possible_keys": [
  383.                   "PRIMARY",
  384.                   "batch_id"
  385.                 ],
  386.                 "key": "batch_id",
  387.                 "used_key_parts": [
  388.                   "batch_id"
  389.                 ],
  390.                 "key_length": "4",
  391.                 "ref": [
  392.                   "reference.tst_batch.id"
  393.                 ],
  394.                 "rows_examined_per_scan": 21,
  395.                 "rows_produced_per_join": 21,
  396.                 "filtered": "100.00",
  397.                 "using_index": true,
  398.                 "cost_info": {
  399.                   "read_cost": "0.82",
  400.                   "eval_cost": "2.14",
  401.                   "prefix_cost": "2.96",
  402.                   "data_read_per_join": "131K"
  403.                 },
  404.                 "used_columns": [
  405.                   "id",
  406.                   "batch_id"
  407.                 ]
  408.               }
  409.             },
  410.             {
  411.               "table": {
  412.                 "table_name": "tst_batch_step",
  413.                 "access_type": "ref",
  414.                 "possible_keys": [
  415.                   "batch_test_case_id"
  416.                 ],
  417.                 "key": "batch_test_case_id",
  418.                 "used_key_parts": [
  419.                   "batch_test_case_id"
  420.                 ],
  421.                 "key_length": "4",
  422.                 "ref": [
  423.                   "reference.tst_batch_test_case.id"
  424.                 ],
  425.                 "rows_examined_per_scan": 31,
  426.                 "rows_produced_per_join": 67,
  427.                 "filtered": "10.00",
  428.                 "cost_info": {
  429.                   "read_cost": "167.65",
  430.                   "eval_cost": "6.71",
  431.                   "prefix_cost": "237.67",
  432.                   "data_read_per_join": "1M"
  433.                 },
  434.                 "used_columns": [
  435.                   "id",
  436.                   "batch_test_case_id",
  437.                   "s_status"
  438.                 ],
  439.                 "attached_condition": "(`reference`.`tst_batch_step`.`s_status` = 'Not Valid')"
  440.               }
  441.             }
  442.           ]
  443.         }
  444.       },
  445.       {
  446.         "dependent": true,
  447.         "cacheable": false,
  448.         "query_block": {
  449.           "select_id": 2,
  450.           "cost_info": {
  451.             "query_cost": "237.66"
  452.           },
  453.           "nested_loop": [
  454.             {
  455.               "table": {
  456.                 "table_name": "tst_batch_test_case",
  457.                 "access_type": "ref",
  458.                 "possible_keys": [
  459.                   "PRIMARY",
  460.                   "batch_id"
  461.                 ],
  462.                 "key": "batch_id",
  463.                 "used_key_parts": [
  464.                   "batch_id"
  465.                 ],
  466.                 "key_length": "4",
  467.                 "ref": [
  468.                   "reference.tst_batch.id"
  469.                 ],
  470.                 "rows_examined_per_scan": 21,
  471.                 "rows_produced_per_join": 21,
  472.                 "filtered": "100.00",
  473.                 "using_index": true,
  474.                 "cost_info": {
  475.                   "read_cost": "0.82",
  476.                   "eval_cost": "2.14",
  477.                   "prefix_cost": "2.96",
  478.                   "data_read_per_join": "131K"
  479.                 },
  480.                 "used_columns": [
  481.                   "id",
  482.                   "batch_id"
  483.                 ]
  484.               }
  485.             },
  486.             {
  487.               "table": {
  488.                 "table_name": "tst_batch_step",
  489.                 "access_type": "ref",
  490.                 "possible_keys": [
  491.                   "batch_test_case_id"
  492.                 ],
  493.                 "key": "batch_test_case_id",
  494.                 "used_key_parts": [
  495.                   "batch_test_case_id"
  496.                 ],
  497.                 "key_length": "4",
  498.                 "ref": [
  499.                   "reference.tst_batch_test_case.id"
  500.                 ],
  501.                 "rows_examined_per_scan": 31,
  502.                 "rows_produced_per_join": 67,
  503.                 "filtered": "10.00",
  504.                 "cost_info": {
  505.                   "read_cost": "167.65",
  506.                   "eval_cost": "6.71",
  507.                   "prefix_cost": "237.67",
  508.                   "data_read_per_join": "1M"
  509.                 },
  510.                 "used_columns": [
  511.                   "id",
  512.                   "batch_test_case_id",
  513.                   "s_status"
  514.                 ],
  515.                 "attached_condition": "(`reference`.`tst_batch_step`.`s_status` = 'KO')"
  516.               }
  517.             }
  518.           ]
  519.         }
  520.       }
  521.     ]
  522.   }
  523. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement