Query time 0.00125
JSON explain
{
"query_block": {
"select_id": 1,
"cost_info": {
"query_cost": "23.13"
},
"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": 19,
"rows_produced_per_join": 0,
"filtered": "0.74",
"cost_info": {
"read_cost": "19.00",
"eval_cost": "0.03",
"prefix_cost": "22.80",
"data_read_per_join": "378"
},
"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 '207/%'))"
}
},
{
"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.14",
"eval_cost": "0.03",
"prefix_cost": "22.97",
"data_read_per_join": "433"
},
"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.14",
"eval_cost": "0.03",
"prefix_cost": "23.14",
"data_read_per_join": "242"
},
"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 |
217 |
207 |
207/217 |
Swimming |
20 |
A |
swimming |
207 |
none |
218 |
207 |
207/218 |
Football |
30 |
A |
football |
207 |
none |
220 |
207 |
207/220 |
Basketball |
50 |
A |
basketball |
207 |
none |
221 |
207 |
207/221 |
Cycling |
60 |
A |
cycling |
207 |
none |
222 |
207 |
207/222 |
Table Games |
70 |
A |
table-games |
207 |
none |
224 |
207 |
207/224 |
Tennis |
90 |
A |
tennis |
207 |
none |
225 |
207 |
207/225 |
Squash |
100 |
A |
squash |
207 |
none |
226 |
207 |
207/226 |
Cardio Training |
110 |
A |
cardio-training |
207 |
none |
233 |
207 |
207/233 |
Yoga |
120 |
A |
yoga |
207 |
none |
234 |
207 |
207/234 |
Strength & Weights |
130 |
A |
strength-and-weights |
207 |
none |
241 |
207 |
207/241 |
Outdoor |
140 |
A |
outdoor |
207 |
none |
242 |
207 |
207/242 |
Fishing |
150 |
A |
fishing |
207 |
none |
243 |
207 |
207/243 |
Camping |
160 |
A |
camping |
207 |
none |
379 |
207 |
207/379 |
Fitness Technology |
170 |
A |
fitness-technology |
207 |
none |
469 |
207 |
207/469 |
Outdoor Recreation |
180 |
A |
outdoor-recreation |
207 |
none |
513 |
207 |
207/513 |
Exercise & Fitness Accessories |
190 |
A |
exercise-and-fitness-accessories |
207 |
none |
580 |
207 |
207/580 |
Badminton |
200 |
A |
badminton |
207 |
none |
614 |
207 |
207/614 |
Boating & Water Sports |
210 |
A |
boating-and-water-sports |
207 |
none |