Query time 0.00279
JSON explain
{
"query_block": {
"select_id": 1,
"cost_info": {
"query_cost": "24.12"
},
"ordering_operation": {
"using_temporary_table": true,
"using_filesort": true,
"nested_loop": [
{
"table": {
"table_name": "q_categories",
"access_type": "ref",
"possible_keys": [
"PRIMARY",
"c_status",
"parent",
"id_path",
"p_category_id"
],
"key": "parent",
"used_key_parts": [
"parent_id"
],
"key_length": "3",
"ref": [
"const"
],
"rows_examined_per_scan": 20,
"rows_produced_per_join": 0,
"filtered": "0.25",
"cost_info": {
"read_cost": "20.00",
"eval_cost": "0.01",
"prefix_cost": "24.00",
"data_read_per_join": "135"
},
"used_columns": [
"category_id",
"parent_id",
"id_path",
"usergroup_ids",
"status",
"position",
"is_trash",
"ab__lc_catalog_image_control"
],
"attached_condition": "(((`portal`.`q_categories`.`usergroup_ids` = '') or find_in_set(0,`portal`.`q_categories`.`usergroup_ids`) or find_in_set(1,`portal`.`q_categories`.`usergroup_ids`)) and (`portal`.`q_categories`.`status` = 'A') and (`portal`.`q_categories`.`id_path` like '190/%') and (`portal`.`q_categories`.`category_id` in (6,184,185,190,193,194,196,199,200,201,202,301,300,375,299,382,383,386,402,191,418,424,428,429,445,446,482,207,513,248,544,545)))"
}
},
{
"table": {
"table_name": "q_category_descriptions",
"access_type": "eq_ref",
"possible_keys": [
"PRIMARY"
],
"key": "PRIMARY",
"used_key_parts": [
"category_id",
"lang_code"
],
"key_length": "9",
"ref": [
"portal.q_categories.category_id",
"const"
],
"rows_examined_per_scan": 1,
"rows_produced_per_join": 0,
"filtered": "100.00",
"cost_info": {
"read_cost": "0.05",
"eval_cost": "0.01",
"prefix_cost": "24.06",
"data_read_per_join": "155"
},
"used_columns": [
"category_id",
"lang_code",
"category"
]
}
},
{
"table": {
"table_name": "q_seo_names",
"access_type": "ref",
"possible_keys": [
"PRIMARY",
"dispatch"
],
"key": "PRIMARY",
"used_key_parts": [
"object_id",
"type",
"dispatch",
"lang_code"
],
"key_length": "206",
"ref": [
"portal.q_categories.category_id",
"const",
"const",
"const"
],
"rows_examined_per_scan": 1,
"rows_produced_per_join": 0,
"filtered": "100.00",
"cost_info": {
"read_cost": "0.05",
"eval_cost": "0.01",
"prefix_cost": "24.12",
"data_read_per_join": "86"
},
"used_columns": [
"name",
"object_id",
"type",
"dispatch",
"path",
"lang_code"
]
}
}
]
}
}
}
Result
category_id |
parent_id |
id_path |
category |
position |
status |
seo_name |
seo_path |
ab__lc_catalog_image_control |
191 |
190 |
190/191 |
Cover Cases |
10 |
A |
cases |
190 |
none |
193 |
190 |
190/193 |
Chargers & Power Adapters |
30 |
A |
chargers-and-power-adapters |
190 |
none |
194 |
190 |
190/194 |
Batteries & Power Banks |
40 |
A |
batteries-and-powerbanks |
190 |
none |
196 |
190 |
190/196 |
Selfie Sticks & Tripods |
60 |
A |
selfie-sticks-and-tripods |
190 |
none |
199 |
190 |
190/199 |
Car Accessories |
90 |
A |
car-accessories |
190 |
none |
200 |
190 |
190/200 |
Corded Headsets |
100 |
A |
corded-headsets |
190 |
none |
201 |
190 |
190/201 |
Bluetooth Headsets |
110 |
A |
bluetooth-headsets |
190 |
none |
202 |
190 |
190/202 |
Cables & Connectors |
120 |
A |
selfie-sticks-and-tripods-en |
190 |
none |
386 |
190 |
190/386 |
Headset |
160 |
A |
headset |
190 |
none |
424 |
190 |
190/424 |
Bluetooth Speakers |
180 |
A |
bluetooth-speakers |
190 |
none |
428 |
190 |
190/428 |
Mobile Holders & Stands |
190 |
A |
mobile-holders-and-stands |
190 |
none |
429 |
190 |
190/429 |
Mobile Tools & Accessories |
200 |
A |
mobile-tools-and-accessories |
190 |
none |