Query time 0.00246
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 (92766,92767,92768,92775,92776,92777,92778,92779,92780,92781,92782,92783,92784,92785,92786,92787,92788,92789,92790,92791,92798,92799,92800,92801,92802,92803,92804,92805,92806,92807,92808,92809,92810,92811,92812,92813,92814,92821,92822,92823,92824,92825,92826,92827,92828,92829,92830,92831,92832,92833,92834,92835,92836,92837,92844,92845,92846,92847,92848,92849,92850,92851,92852,92853,92854,92855,92856,92857,92858,92859,92860,92861,92862,92863,92864,92865,92866,92867,92868,92869,92870,92871,92872,92873,92874,92875,92876,92877,92878,92879,92880,92881,92882,92883,92884,92885))"
}
},
{
"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 |
| 92766 |
7192M |
0 |
| 92767 |
7192M |
0 |
| 92768 |
7192M |
0 |
| 92775 |
7192M |
0 |
| 92776 |
7192M |
0 |
| 92777 |
7192M |
0 |
| 92778 |
7192M |
0 |
| 92779 |
7192M |
0 |
| 92780 |
7192M |
0 |
| 92781 |
7192M |
0 |
| 92782 |
7192M |
0 |
| 92783 |
7192M |
0 |
| 92784 |
7192M |
0 |
| 92785 |
7192M |
0 |
| 92786 |
7192M |
0 |
| 92787 |
7192M |
0 |
| 92788 |
7192M |
0 |
| 92789 |
7192M |
0 |
| 92790 |
7192M |
0 |
| 92791 |
7192M |
0 |
| 92798 |
7192M |
0 |
| 92799 |
7192M |
0 |
| 92800 |
7192M |
0 |
| 92801 |
7192M |
0 |
| 92802 |
7192M |
0 |
| 92803 |
7192M |
0 |
| 92804 |
7192M |
0 |
| 92805 |
7192M |
0 |
| 92806 |
7192M |
0 |
| 92807 |
7192M |
0 |
| 92808 |
7192M |
0 |
| 92809 |
7192M |
0 |
| 92810 |
7192M |
0 |
| 92811 |
7192M |
0 |
| 92812 |
7192M |
0 |
| 92813 |
7192M |
0 |
| 92814 |
7192M |
0 |
| 92821 |
7192M |
0 |
| 92822 |
7192M |
0 |
| 92823 |
7192M |
0 |
| 92824 |
7192M |
0 |
| 92825 |
7192M |
0 |
| 92826 |
7192M |
0 |
| 92827 |
7192M |
0 |
| 92828 |
7192M |
0 |
| 92829 |
7192M |
0 |
| 92830 |
7192M |
0 |
| 92831 |
7192M |
0 |
| 92832 |
7192M |
0 |
| 92833 |
7192M |
0 |
| 92834 |
7192M |
0 |
| 92835 |
7192M |
0 |
| 92836 |
7192M |
0 |
| 92837 |
7192M |
0 |
| 92844 |
7192M |
0 |
| 92845 |
7192M |
0 |
| 92846 |
7192M |
0 |
| 92847 |
7192M |
0 |
| 92848 |
7192M |
0 |
| 92849 |
7192M |
0 |
| 92850 |
7192M |
0 |
| 92851 |
7192M |
0 |
| 92852 |
7192M |
0 |
| 92853 |
7192M |
0 |
| 92854 |
7192M |
0 |
| 92855 |
7192M |
0 |
| 92856 |
7192M |
0 |
| 92857 |
7192M |
0 |
| 92858 |
7192M |
0 |
| 92859 |
7192M |
0 |
| 92860 |
7192M |
0 |
| 92861 |
7192M |
0 |
| 92862 |
7192M |
0 |
| 92863 |
7192M |
0 |
| 92864 |
7192M |
0 |
| 92865 |
7192M |
0 |
| 92866 |
7192M |
0 |
| 92867 |
7192M |
0 |
| 92868 |
7192M |
0 |
| 92869 |
7192M |
0 |
| 92870 |
7192M |
0 |
| 92871 |
7192M |
0 |
| 92872 |
7192M |
0 |
| 92873 |
7192M |
0 |
| 92874 |
7192M |
0 |
| 92875 |
7192M |
0 |
| 92876 |
7192M |
0 |
| 92877 |
7192M |
0 |
| 92878 |
7192M |
0 |
| 92879 |
7192M |
0 |
| 92880 |
7192M |
0 |
| 92881 |
7192M |
0 |
| 92882 |
7192M |
0 |
| 92883 |
7192M |
0 |
| 92884 |
7192M |
0 |
| 92885 |
7192M |
0 |