Query time 0.00089
JSON explain
{
"query_block": {
"select_id": 1,
"cost_info": {
"query_cost": "11.04"
},
"ordering_operation": {
"using_temporary_table": true,
"using_filesort": true,
"nested_loop": [
{
"table": {
"table_name": "q_categories",
"access_type": "ref",
"possible_keys": [
"c_status",
"parent",
"id_path"
],
"key": "parent",
"used_key_parts": [
"parent_id"
],
"key_length": "3",
"ref": [
"const"
],
"rows_examined_per_scan": 9,
"rows_produced_per_join": 0,
"filtered": "1.14",
"cost_info": {
"read_cost": "9.00",
"eval_cost": "0.02",
"prefix_cost": "10.80",
"data_read_per_join": "276"
},
"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 '2/%'))"
}
},
{
"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.10",
"eval_cost": "0.02",
"prefix_cost": "10.92",
"data_read_per_join": "317"
},
"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.10",
"eval_cost": "0.02",
"prefix_cost": "11.05",
"data_read_per_join": "177"
},
"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 |
3 |
2 |
2/3 |
Fragrance |
10 |
A |
fragrance |
2 |
none |
10 |
2 |
2/10 |
Skin Care |
30 |
A |
skin-care |
2 |
none |
11 |
2 |
2/11 |
Hair Care |
40 |
A |
hair-care |
2 |
none |
138 |
2 |
2/138 |
Oral Care |
50 |
A |
oral-care |
2 |
none |
144 |
2 |
2/144 |
Personal Care |
60 |
A |
personalcare |
2 |
none |
245 |
2 |
2/245 |
Supplements & Nutrition |
70 |
A |
supplements-and-vitamins |
2 |
none |
405 |
2 |
2/405 |
Sleep & Snoring |
80 |
A |
sleep-and-snoring |
2 |
none |
432 |
2 |
2/432 |
Monitoring & Testing Equipment |
90 |
A |
monitoring-and-testing-equipment |
2 |
none |
578 |
2 |
2/578 |
Medication & Remedies |
110 |
A |
medication-and-remedies |
2 |
none |
589 |
2 |
2/589 |
Food & Beverages |
120 |
A |
f-and-b |
2 |
none |
617 |
2 |
2/617 |
Visual Care |
130 |
A |
visual-care |
2 |
none |