Skip to content

Commit

Permalink
add exp_json and opt_trace for queries
Browse files Browse the repository at this point in the history
  • Loading branch information
Jeanhwea committed Jul 4, 2024
1 parent 24e058c commit db5ded2
Show file tree
Hide file tree
Showing 20 changed files with 4,084 additions and 16 deletions.
76 changes: 76 additions & 0 deletions assets/subq10_sj_default_exp.sql.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
{
"query_block": {
"select_id": 1,
"cost_info": {
"query_cost": "6.50"
},
"nested_loop": [
{
"table": {
"table_name": "d",
"access_type": "index",
"possible_keys": [
"PRIMARY"
],
"key": "dept_name",
"used_key_parts": [
"dept_name"
],
"key_length": "162",
"rows_examined_per_scan": 9,
"rows_produced_per_join": 9,
"filtered": "100.00",
"using_index": true,
"cost_info": {
"read_cost": "0.25",
"eval_cost": "0.90",
"prefix_cost": "1.15",
"data_read_per_join": "1K"
},
"used_columns": [
"dept_no",
"dept_name"
]
}
},
{
"table": {
"table_name": "<subquery2>",
"access_type": "eq_ref",
"key": "<auto_distinct_key>",
"key_length": "16",
"ref": [
"employees.d.dept_no"
],
"rows_examined_per_scan": 1,
"materialized_from_subquery": {
"using_temporary_table": true,
"query_block": {
"table": {
"table_name": "a",
"access_type": "ALL",
"possible_keys": [
"dept_no"
],
"rows_examined_per_scan": 24,
"rows_produced_per_join": 7,
"filtered": "33.33",
"cost_info": {
"read_cost": "1.85",
"eval_cost": "0.80",
"prefix_cost": "2.65",
"data_read_per_join": "255"
},
"used_columns": [
"dept_no",
"from_date"
],
"attached_condition": "(`employees`.`a`.`from_date` >= DATE'1995-01-01')"
}
}
}
}
}
]
}
}
Loading

0 comments on commit db5ded2

Please sign in to comment.