Query time 0.00454
JSON explain
{
"query_block": {
"select_id": 1,
"cost_info": {
"query_cost": "252853.22"
},
"ordering_operation": {
"using_filesort": true,
"grouping_operation": {
"using_temporary_table": true,
"using_filesort": false,
"nested_loop": [
{
"table": {
"table_name": "c",
"access_type": "ALL",
"possible_keys": [
"PRIMARY",
"p_category_id"
],
"rows_examined_per_scan": 1378,
"rows_produced_per_join": 137,
"filtered": "10.00",
"cost_info": {
"read_cost": "129.74",
"eval_cost": "13.78",
"prefix_cost": "143.52",
"data_read_per_join": "462K"
},
"used_columns": [
"category_id",
"parent_id",
"id_path",
"level",
"company_id",
"storefront_id",
"usergroup_ids",
"status",
"product_count",
"position",
"timestamp",
"is_op",
"localization",
"age_verification",
"age_limit",
"parent_age_verification",
"parent_age_limit",
"selected_views",
"default_view",
"product_details_view",
"product_columns",
"is_trash",
"is_default",
"category_type",
"featured"
],
"attached_condition": "(`cscartdb`.`c`.`company_id` = 372)"
}
},
{
"table": {
"table_name": "cd",
"access_type": "ref",
"possible_keys": [
"PRIMARY"
],
"key": "PRIMARY",
"used_key_parts": [
"category_id"
],
"key_length": "3",
"ref": [
"cscartdb.c.category_id"
],
"rows_examined_per_scan": 13,
"rows_produced_per_join": 1791,
"filtered": "100.00",
"cost_info": {
"read_cost": "447.85",
"eval_cost": "179.14",
"prefix_cost": "770.51",
"data_read_per_join": "5M"
},
"used_columns": [
"category_id",
"category"
]
}
},
{
"table": {
"table_name": "pc",
"access_type": "ref",
"possible_keys": [
"PRIMARY"
],
"key": "PRIMARY",
"used_key_parts": [
"category_id"
],
"key_length": "3",
"ref": [
"cscartdb.c.category_id"
],
"rows_examined_per_scan": 623,
"rows_produced_per_join": 1116042,
"filtered": "100.00",
"using_index": true,
"cost_info": {
"read_cost": "7411.92",
"eval_cost": "111604.22",
"prefix_cost": "119786.65",
"data_read_per_join": "17M"
},
"used_columns": [
"product_id",
"category_id"
]
}
},
{
"table": {
"table_name": "p",
"access_type": "eq_ref",
"possible_keys": [
"PRIMARY",
"status",
"idx_parent_product_id"
],
"key": "PRIMARY",
"used_key_parts": [
"product_id"
],
"key_length": "3",
"ref": [
"cscartdb.pc.product_id"
],
"rows_examined_per_scan": 1,
"rows_produced_per_join": 1116042,
"filtered": "100.00",
"cost_info": {
"read_cost": "21462.35",
"eval_cost": "111604.22",
"prefix_cost": "252853.22",
"data_read_per_join": "5G"
},
"used_columns": [
"product_id",
"status",
"parent_product_id"
],
"attached_condition": "<if>(is_not_null_compl(p), ((`cscartdb`.`p`.`parent_product_id` = 0) and (`cscartdb`.`p`.`status` = 'A')), true)"
}
}
]
}
}
}
}
Result
category_id |
parent_id |
id_path |
level |
company_id |
storefront_id |
usergroup_ids |
status |
product_count |
position |
timestamp |
is_op |
localization |
age_verification |
age_limit |
parent_age_verification |
parent_age_limit |
selected_views |
default_view |
product_details_view |
product_columns |
is_trash |
is_default |
category_type |
featured |
category_name |
1373 |
155 |
155/1373 |
2 |
372 |
0 |
0 |
A |
4 |
7710 |
0 |
N |
|
N |
0 |
N |
0 |
|
|
|
0 |
N |
N |
C |
|
Thong |