Query time 0.00190
JSON explain
{
"query_block": {
"select_id": 1,
"cost_info": {
"query_cost": "281.15"
},
"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": 100,
"rows_produced_per_join": 100,
"filtered": "100.00",
"using_index": true,
"cost_info": {
"read_cost": "21.15",
"eval_cost": "20.00",
"prefix_cost": "41.15",
"data_read_per_join": "1K"
},
"used_columns": [
"product_id",
"category_id",
"link_type"
],
"attached_condition": "(`webmarco`.`cscart_products_categories`.`product_id` in (350592,351862,354203,356480,356560,352897,356801,358945,349757,356497,356655,353178,356621,350319,357585,359008,359423,357930,352714,356443,356820,356985,352282,352085,354417,355651,350568,357383,353410,354653,350662,350975,351747,351892,352001,352747,357301,350152,350702,352610,353056,352021,354389,354942,359333,350645,352146,351489,351559,354382,353005,353543,354867,356810,350934,358064,350921,351928,357077,359076,351691,354804,355599,354563,357575,350464,349744,354771,349701,349734,349789,352000,352373,352559,354400,355170,357736,358536,358989,359320,350473,353799,358182,352578,353895,356669,349735,353312,353424,351936,358007,350147,350705,352078,354094,354802,356694,351931,353703,350055))"
}
},
{
"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": 100,
"filtered": "100.00",
"cost_info": {
"read_cost": "100.00",
"eval_cost": "20.00",
"prefix_cost": "161.15",
"data_read_per_join": "1K"
},
"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": 5,
"filtered": "5.00",
"cost_info": {
"read_cost": "100.00",
"eval_cost": "1.00",
"prefix_cost": "281.15",
"data_read_per_join": "29K"
},
"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 |
349701 |
2916M |
|
349734 |
2916M |
|
349735 |
2916M |
|
349744 |
2916M |
|
349757 |
2916M |
|
349789 |
2916M |
|
350055 |
2916M |
|
350147 |
2916M |
|
350152 |
2916M |
|
350319 |
2913M |
|
350464 |
2913M |
|
350473 |
2913M |
|
350568 |
2913M |
|
350592 |
2913M |
|
350645 |
2920M |
|
350662 |
2920M |
|
350702 |
2920M |
|
350705 |
2920M |
|
350921 |
2920M |
|
350934 |
2920M |
|
350975 |
2920M |
|
351489 |
2920M |
|
351559 |
2916M |
|
351691 |
2920M |
|
351747 |
2916M |
|
351862 |
2916M |
|
351892 |
2916M |
|
351928 |
2916M |
|
351931 |
2916M |
|
351936 |
2916M |
|
352000 |
2916M |
|
352001 |
2916M |
|
352021 |
2916M |
|
352078 |
2916M |
|
352085 |
2916M |
|
352146 |
2916M |
|
352282 |
2920M |
|
352373 |
2916M |
|
352559 |
2916M |
|
352578 |
2916M |
|
352610 |
2916M |
|
352714 |
2916M |
|
352747 |
2916M |
|
352897 |
3408M |
|
353005 |
3105M |
|
353056 |
3105M |
|
353178 |
3408M |
|
353312 |
3408M |
|
353410 |
3408M |
|
353424 |
3408M |
|
353543 |
3408M |
|
353703 |
2913M |
|
353799 |
3105M |
|
353895 |
3408M |
|
354094 |
3105M |
|
354203 |
3408M |
|
354382 |
2916M |
|
354389 |
2916M |
|
354400 |
2916M |
|
354417 |
2916M |
|
354563 |
3105M |
|
354653 |
2916M |
|
354771 |
2916M |
|
354802 |
2916M |
|
354804 |
2916M |
|
354867 |
2916M |
|
354942 |
2920M |
|
355170 |
2920M |
|
355599 |
2916M |
|
355651 |
2916M |
|
356443 |
2916M |
|
356480 |
2916M |
|
356497 |
2916M |
|
356560 |
2916M |
|
356621 |
2916M |
|
356655 |
2916M |
|
356669 |
2916M |
|
356694 |
2916M |
|
356801 |
3105M |
|
356810 |
3105M |
|
356820 |
3105M |
|
356985 |
2920M |
|
357077 |
2920M |
|
357301 |
2920M |
|
357383 |
2920M |
|
357575 |
2916M |
|
357585 |
2916M |
|
357736 |
2920M |
|
357930 |
2920M |
|
358007 |
2920M |
|
358064 |
2920M |
|
358182 |
2920M |
|
358536 |
2916M |
|
358945 |
2916M |
|
358989 |
2916M |
|
359008 |
2916M |
|
359076 |
2916M |
|
359320 |
2920M |
|
359333 |
2920M |
|
359423 |
2916M |
|