Query time 0.00258
JSON explain
{
"query_block": {
"select_id": 1,
"cost_info": {
"query_cost": "295.16"
},
"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": 105,
"rows_produced_per_join": 105,
"filtered": "100.00",
"using_index": true,
"cost_info": {
"read_cost": "22.16",
"eval_cost": "21.00",
"prefix_cost": "43.16",
"data_read_per_join": "1K"
},
"used_columns": [
"product_id",
"category_id",
"link_type"
],
"attached_condition": "(`webmarco`.`cscart_products_categories`.`product_id` in (271483,271484,190720,190686,190711,190675,190708,190716,415219,190712,190700,415312,190710,427780,190709,190721,190722,190680,190701,190717,190714,190679,190715,190681,190694,190685,190677,190688,190687,190678,190682,190684,427788,190702,352784,190704,190703,190706,190707,352781,352794,352795,352778,356734,352793,352791,352785,354012,352776,352777,352788,352792,352779,352790,352783,352787,359761,352786,356712,309479,356705,356862,356753,359804,352882,356714,356701,356859,352782,265116,356707,352780,356727,354114,352789,355579,435267,356958,435266,435268,435265,354572,356703,356724,356764,353643,356716,356878,353851,356813,353538,354532,353505,354679,356870,354027,354033,354536,353498,353653))"
}
},
{
"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": 105,
"filtered": "100.00",
"cost_info": {
"read_cost": "105.00",
"eval_cost": "21.00",
"prefix_cost": "169.16",
"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": "105.00",
"eval_cost": "1.05",
"prefix_cost": "295.16",
"data_read_per_join": "31K"
},
"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 |
190675 |
3130M |
|
190677 |
3130M |
|
190678 |
3130M |
|
190679 |
3130M |
|
190680 |
2910,3130M |
|
190681 |
3130M |
|
190682 |
3130M |
|
190684 |
3130M |
|
190685 |
3130M |
|
190686 |
3130M |
|
190687 |
3130M |
|
190688 |
3130M |
|
190694 |
3130M |
|
190700 |
3130M |
|
190701 |
3130M |
|
190702 |
3130M |
|
190703 |
3125M |
|
190704 |
3125M |
|
190706 |
3125M |
|
190707 |
3125M |
|
190708 |
3104M |
|
190709 |
3104M |
|
190710 |
3104M |
|
190711 |
3104M |
|
190712 |
3104M |
|
190714 |
3104M |
|
190715 |
3104M |
|
190716 |
3104M |
|
190717 |
3104M |
|
190720 |
3104M |
|
190721 |
3104M |
|
190722 |
3104M |
|
265116 |
9832M |
|
271483 |
3269M |
|
271484 |
3269M |
|
309479 |
9832M |
|
352776 |
3105M |
0 |
352777 |
3105M |
0 |
352778 |
3105M |
0 |
352779 |
3105M |
0 |
352780 |
3105M |
0 |
352781 |
3105M |
0 |
352782 |
3105M |
0 |
352783 |
3105M |
0 |
352784 |
3105M |
0 |
352785 |
3105M |
0 |
352786 |
3105M |
0 |
352787 |
3105M |
0 |
352788 |
3105M |
0 |
352789 |
3105M |
0 |
352790 |
3105M |
0 |
352791 |
3105M |
0 |
352792 |
3105M |
0 |
352793 |
3105M |
0 |
352794 |
3105M |
0 |
352795 |
3105M |
0 |
352882 |
3105M |
0 |
353498 |
3105M |
0 |
353505 |
3105M |
0 |
353538 |
3105M |
0 |
353643 |
3105M |
0 |
353653 |
3105M |
0 |
353851 |
3105M |
0 |
354012 |
3105M |
0 |
354027 |
3105M |
0 |
354033 |
3105M |
0 |
354114 |
3105M |
0 |
354532 |
3105M |
0 |
354536 |
3105M |
0 |
354572 |
3105M |
0 |
354679 |
3105M |
0 |
355579 |
3105M |
0 |
356701 |
3105M |
0 |
356703 |
3105M |
0 |
356705 |
3105M |
0 |
356707 |
3105M |
0 |
356712 |
3105M |
0 |
356714 |
3105M |
0 |
356716 |
3105M |
0 |
356724 |
3105M |
0 |
356727 |
3105M |
0 |
356734 |
3105M |
0 |
356753 |
3105M |
0 |
356764 |
3105M |
0 |
356813 |
3105M |
0 |
356859 |
3105M |
0 |
356862 |
3105M |
0 |
356870 |
3105M |
0 |
356878 |
3105M |
0 |
356958 |
3105M |
0 |
359761 |
9832M |
|
359804 |
9832M |
|
415219 |
3407M |
|
415312 |
3407M |
|
427780 |
2910,3224,6897M |
|
427788 |
3228,3231,5152M |
|
435265 |
9832M |
|
435266 |
9832M |
|
435267 |
9832M |
|
435268 |
9832M |
|