Query time 0.00113
JSON explain
{
"query_block": {
"select_id": 1,
"cost_info": {
"query_cost": "56.48"
},
"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": 99,
"rows_produced_per_join": 99,
"filtered": "100.00",
"using_index": true,
"cost_info": {
"read_cost": "10.20",
"eval_cost": "9.90",
"prefix_cost": "20.10",
"data_read_per_join": "1K"
},
"used_columns": [
"product_id",
"category_id",
"link_type"
],
"attached_condition": "(`nuie_scalesta_net`.`cscart_products_categories`.`product_id` in (83046,83047,90882,90883,90961,90962,85330,85427,85478,85529,86497,86498,86773,86774,85311,85312,85408,85409,85459,85460,85510,85511,85075,85161,85207,85253,82846,82919,82992,83068,83476,83484,83621,90904,90983,83034,83591,90870,90949,85357,85358,85115,85376,82816,82817,82889,82890,82962,82963,83336,83337,83346,83347,86488,86764,83548,85078,85164,85210,85256,86623,86692,82597,82598,83037,83045,83360,83361,83594,90873,90881,90952,90960,82621,83424,85118,82627,83492,83258,83265,86496,86657,86726,86772,85310,85407,85458,85509,86635,86636,86704,86705,85356,82815,82888,82961))"
}
},
{
"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.75",
"eval_cost": "0.50",
"prefix_cost": "54.75",
"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.24",
"eval_cost": "0.50",
"prefix_cost": "56.48",
"data_read_per_join": "79"
},
"used_columns": [
"product_id",
"category_id",
"position"
]
}
}
]
}
}
}
Result
| product_id |
category_ids |
position |
| 82597 |
7192M |
0 |
| 82598 |
7192M |
0 |
| 82621 |
7192M |
0 |
| 82627 |
7192M |
0 |
| 82815 |
7192M |
0 |
| 82816 |
7192M |
0 |
| 82817 |
7192M |
0 |
| 82846 |
7192M |
0 |
| 82888 |
7192M |
0 |
| 82889 |
7192M |
0 |
| 82890 |
7192M |
0 |
| 82919 |
7192M |
0 |
| 82961 |
7192M |
0 |
| 82962 |
7192M |
0 |
| 82963 |
7192M |
0 |
| 82992 |
7192M |
0 |
| 83034 |
7192M |
0 |
| 83037 |
7192M |
0 |
| 83045 |
7192M |
0 |
| 83046 |
7192M |
0 |
| 83047 |
7192M |
0 |
| 83068 |
7192M |
0 |
| 83258 |
7170,7192M |
0 |
| 83265 |
7170,7192M |
0 |
| 83336 |
7192M |
0 |
| 83337 |
7192M |
0 |
| 83346 |
7192M |
0 |
| 83347 |
7192M |
0 |
| 83360 |
7192M |
0 |
| 83361 |
7192M |
0 |
| 83424 |
7192M |
0 |
| 83476 |
7192M |
0 |
| 83484 |
7192M |
0 |
| 83492 |
7192M |
0 |
| 83548 |
7170,7192M |
0 |
| 83591 |
7192M |
0 |
| 83594 |
7192M |
0 |
| 83621 |
7192M |
0 |
| 85075 |
7192M |
0 |
| 85078 |
7192M |
0 |
| 85115 |
7192M |
0 |
| 85118 |
7192M |
0 |
| 85161 |
7192M |
0 |
| 85164 |
7192M |
0 |
| 85207 |
7192M |
0 |
| 85210 |
7192M |
0 |
| 85253 |
7192M |
0 |
| 85256 |
7192M |
0 |
| 85310 |
7192M |
0 |
| 85311 |
7192M |
0 |
| 85312 |
7192M |
0 |
| 85330 |
7192M |
0 |
| 85356 |
7192M |
0 |
| 85357 |
7192M |
0 |
| 85358 |
7192M |
0 |
| 85376 |
7192M |
0 |
| 85407 |
7192M |
0 |
| 85408 |
7192M |
0 |
| 85409 |
7192M |
0 |
| 85427 |
7192M |
0 |
| 85458 |
7192M |
0 |
| 85459 |
7192M |
0 |
| 85460 |
7192M |
0 |
| 85478 |
7192M |
0 |
| 85509 |
7192M |
0 |
| 85510 |
7192M |
0 |
| 85511 |
7192M |
0 |
| 85529 |
7192M |
0 |
| 86488 |
7192M |
0 |
| 86496 |
7192M |
0 |
| 86497 |
7192M |
0 |
| 86498 |
7192M |
0 |
| 86623 |
7192M |
0 |
| 86635 |
7192M |
0 |
| 86636 |
7192M |
0 |
| 86657 |
7192M |
0 |
| 86692 |
7192M |
0 |
| 86704 |
7192M |
0 |
| 86705 |
7192M |
0 |
| 86726 |
7192M |
0 |
| 86764 |
7192M |
0 |
| 86772 |
7192M |
0 |
| 86773 |
7192M |
0 |
| 86774 |
7192M |
0 |
| 90870 |
7192M |
0 |
| 90873 |
7192M |
0 |
| 90881 |
7192M |
0 |
| 90882 |
7192M |
0 |
| 90883 |
7192M |
0 |
| 90904 |
7192M |
0 |
| 90949 |
7192M |
0 |
| 90952 |
7192M |
0 |
| 90960 |
7192M |
0 |
| 90961 |
7192M |
0 |
| 90962 |
7192M |
0 |
| 90983 |
7192M |
0 |