Query time 0.00132
JSON explain
{
"query_block": {
"select_id": 1,
"cost_info": {
"query_cost": "118.67"
},
"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": 42,
"rows_produced_per_join": 42,
"filtered": "100.00",
"using_index": true,
"cost_info": {
"read_cost": "9.47",
"eval_cost": "8.40",
"prefix_cost": "17.87",
"data_read_per_join": "672"
},
"used_columns": [
"product_id",
"category_id",
"link_type"
],
"attached_condition": "(`webmarco`.`cscart_products_categories`.`product_id` in (82071,82118,82073,82038,149042,82061,81948,82101,82009,81647,82133,82103,81737,81655,82104,81704,81826,81863,81741,81860,81702,82072,81634,81657,81739,81625,82115,81776,82074,81862,81627,82114,82069,81773,81636,81624,82099,82052,82096,81747,82116,82095))"
}
},
{
"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",
"webmarco.cscart_products_categories.product_id"
],
"rows_examined_per_scan": 1,
"rows_produced_per_join": 42,
"filtered": "100.00",
"cost_info": {
"read_cost": "42.00",
"eval_cost": "8.40",
"prefix_cost": "68.27",
"data_read_per_join": "672"
},
"used_columns": [
"product_id",
"category_id",
"position"
]
}
},
{
"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": [
"webmarco.cscart_products_categories.category_id"
],
"rows_examined_per_scan": 1,
"rows_produced_per_join": 2,
"filtered": "5.00",
"cost_info": {
"read_cost": "42.00",
"eval_cost": "0.42",
"prefix_cost": "118.67",
"data_read_per_join": "12K"
},
"used_columns": [
"category_id",
"usergroup_ids",
"status",
"storefront_id"
],
"attached_condition": "((`webmarco`.`cscart_categories`.`storefront_id` in (0,1)) and ((`webmarco`.`cscart_categories`.`usergroup_ids` = '') or find_in_set(0,`webmarco`.`cscart_categories`.`usergroup_ids`) or find_in_set(1,`webmarco`.`cscart_categories`.`usergroup_ids`)) and (`webmarco`.`cscart_categories`.`status` in ('A','H')))"
}
}
]
}
}
}
Result
product_id |
category_ids |
position |
81624 |
2904M |
0 |
81625 |
2904M |
0 |
81627 |
2904M |
0 |
81634 |
2904M |
0 |
81636 |
2904M |
0 |
81647 |
2904M |
0 |
81655 |
2904M |
0 |
81657 |
2904M |
0 |
81702 |
2904M |
0 |
81704 |
2904M |
0 |
81737 |
2904M |
0 |
81739 |
2904M |
0 |
81741 |
2904M |
0 |
81747 |
2904M |
0 |
81773 |
2904M |
0 |
81776 |
2904M |
0 |
81826 |
2904M |
0 |
81860 |
2904M |
0 |
81862 |
2904M |
0 |
81863 |
2904M |
0 |
81948 |
2904M |
0 |
82009 |
2904M |
0 |
82038 |
2904M |
0 |
82052 |
2904M |
0 |
82061 |
2904M |
0 |
82069 |
2904M |
0 |
82071 |
2904M |
0 |
82072 |
2904M |
0 |
82073 |
2904M |
0 |
82074 |
2904M |
0 |
82095 |
2904M |
0 |
82096 |
2904M |
0 |
82099 |
2904M |
0 |
82101 |
2904M |
0 |
82103 |
2904M |
0 |
82104 |
2904M |
0 |
82114 |
2904M |
0 |
82115 |
2904M |
0 |
82116 |
2904M |
0 |
82118 |
2904M |
0 |
82133 |
2904M |
0 |
149042 |
2904M |
0 |