Query time 0.00216
JSON explain
{
"query_block": {
"select_id": 1,
"cost_info": {
"query_cost": "54.77"
},
"grouping_operation": {
"using_filesort": false,
"nested_loop": [
{
"table": {
"table_name": "cscart_products_categories",
"access_type": "range",
"possible_keys": [
"PRIMARY",
"link_type",
"pt"
],
"key": "pt",
"used_key_parts": [
"product_id"
],
"key_length": "3",
"rows_examined_per_scan": 96,
"rows_produced_per_join": 96,
"filtered": "100.00",
"using_index": true,
"cost_info": {
"read_cost": "9.89",
"eval_cost": "9.60",
"prefix_cost": "19.49",
"data_read_per_join": "1K"
},
"used_columns": [
"product_id",
"category_id",
"link_type"
],
"attached_condition": "(`nuie_scalesta_net`.`cscart_products_categories`.`product_id` in (94732,94736,94740,94744,94748,96305,96306,96307,96309,96312,96315,96317,96320,96322,96324,96326,96328,96330,96332,96335,96339,97016,97022,97023,97026,97030,97032,97039,97045,97833,97843,97847,97852,97856,97860,97864,97868,97872,97890,97891,97892,97893,97894,97895,97896,97897,97898,97899,97900,97901,97902,97915,97916,97917,97918,97919,97920,97921,97922,97923,97924,97925,97926,97927,97928,97929,97930,97931,97932,97933,97934,97947,97948,97949,97950,97951,97960,97961,97964,97965,97966,97969,97974,97976,97977,97980,97981,97984,97985,98040,98042,98044,98046,98048,98050,98085))"
}
},
{
"table": {
"table_name": "cscart_categories",
"access_type": "eq_ref",
"possible_keys": [
"PRIMARY",
"c_status",
"p_category_id"
],
"key": "PRIMARY",
"used_key_parts": [
"category_id"
],
"key_length": "3",
"ref": [
"nuie_scalesta_net.cscart_products_categories.category_id"
],
"rows_examined_per_scan": 1,
"rows_produced_per_join": 4,
"filtered": "5.00",
"cost_info": {
"read_cost": "24.00",
"eval_cost": "0.48",
"prefix_cost": "53.09",
"data_read_per_join": "12K"
},
"used_columns": [
"category_id",
"usergroup_ids",
"status",
"storefront_id"
],
"attached_condition": "((`nuie_scalesta_net`.`cscart_categories`.`storefront_id` in (0,1)) and ((`nuie_scalesta_net`.`cscart_categories`.`usergroup_ids` = '') or (0 <> find_in_set(0,`nuie_scalesta_net`.`cscart_categories`.`usergroup_ids`)) or (0 <> find_in_set(1,`nuie_scalesta_net`.`cscart_categories`.`usergroup_ids`))) and (`nuie_scalesta_net`.`cscart_categories`.`status` in ('A','H')))"
}
},
{
"table": {
"table_name": "product_position_source",
"access_type": "eq_ref",
"possible_keys": [
"PRIMARY",
"pt"
],
"key": "PRIMARY",
"used_key_parts": [
"category_id",
"product_id"
],
"key_length": "6",
"ref": [
"const",
"nuie_scalesta_net.cscart_products_categories.product_id"
],
"rows_examined_per_scan": 1,
"rows_produced_per_join": 4,
"filtered": "100.00",
"cost_info": {
"read_cost": "1.20",
"eval_cost": "0.48",
"prefix_cost": "54.77",
"data_read_per_join": "76"
},
"used_columns": [
"product_id",
"category_id",
"position"
]
}
}
]
}
}
}
Result
| product_id |
category_ids |
position |
| 94732 |
7186M |
0 |
| 94736 |
7186M |
0 |
| 94740 |
7186M |
0 |
| 94744 |
7186M |
0 |
| 94748 |
7186M |
0 |
| 96305 |
7186M |
0 |
| 96306 |
7186M |
0 |
| 96307 |
7186M |
0 |
| 96309 |
7186M |
0 |
| 96312 |
7186M |
0 |
| 96315 |
7186M |
0 |
| 96317 |
7186M |
0 |
| 96320 |
7186M |
0 |
| 96322 |
7186M |
0 |
| 96324 |
7186M |
0 |
| 96326 |
7186M |
0 |
| 96328 |
7186M |
0 |
| 96330 |
7186M |
0 |
| 96332 |
7186M |
0 |
| 96335 |
7186M |
0 |
| 96339 |
7186M |
0 |
| 97016 |
7186M |
0 |
| 97022 |
7186M |
0 |
| 97023 |
7186M |
0 |
| 97026 |
7186M |
0 |
| 97030 |
7186M |
0 |
| 97032 |
7186M |
0 |
| 97039 |
7186M |
0 |
| 97045 |
7186M |
0 |
| 97833 |
7186M |
0 |
| 97843 |
7186M |
0 |
| 97847 |
7186M |
0 |
| 97852 |
7186M |
0 |
| 97856 |
7186M |
0 |
| 97860 |
7186M |
0 |
| 97864 |
7186M |
0 |
| 97868 |
7186M |
0 |
| 97872 |
7186M |
0 |
| 97890 |
7186M |
0 |
| 97891 |
7186M |
0 |
| 97892 |
7186M |
0 |
| 97893 |
7186M |
0 |
| 97894 |
7186M |
0 |
| 97895 |
7186M |
0 |
| 97896 |
7186M |
0 |
| 97897 |
7186M |
0 |
| 97898 |
7186M |
0 |
| 97899 |
7186M |
0 |
| 97900 |
7186M |
0 |
| 97901 |
7186M |
0 |
| 97902 |
7186M |
0 |
| 97915 |
7186M |
0 |
| 97916 |
7186M |
0 |
| 97917 |
7186M |
0 |
| 97918 |
7186M |
0 |
| 97919 |
7186M |
0 |
| 97920 |
7186M |
0 |
| 97921 |
7186M |
0 |
| 97922 |
7186M |
0 |
| 97923 |
7186M |
0 |
| 97924 |
7186M |
0 |
| 97925 |
7186M |
0 |
| 97926 |
7186M |
0 |
| 97927 |
7186M |
0 |
| 97928 |
7186M |
0 |
| 97929 |
7186M |
0 |
| 97930 |
7186M |
0 |
| 97931 |
7186M |
0 |
| 97932 |
7186M |
0 |
| 97933 |
7186M |
0 |
| 97934 |
7186M |
0 |
| 97947 |
7186M |
0 |
| 97948 |
7186M |
0 |
| 97949 |
7186M |
0 |
| 97950 |
7186M |
0 |
| 97951 |
7186M |
0 |
| 97960 |
7186M |
0 |
| 97961 |
7186M |
0 |
| 97964 |
7186M |
0 |
| 97965 |
7186M |
0 |
| 97966 |
7186M |
0 |
| 97969 |
7186M |
0 |
| 97974 |
7186M |
0 |
| 97976 |
7186M |
0 |
| 97977 |
7186M |
0 |
| 97980 |
7186M |
0 |
| 97981 |
7186M |
0 |
| 97984 |
7186M |
0 |
| 97985 |
7186M |
0 |
| 98040 |
7186M |
0 |
| 98042 |
7186M |
0 |
| 98044 |
7186M |
0 |
| 98046 |
7186M |
0 |
| 98048 |
7186M |
0 |
| 98050 |
7186M |
0 |
| 98085 |
7186M |
0 |