Query time 0.00152
JSON explain
{
"query_block": {
"select_id": 1,
"cost_info": {
"query_cost": "27.52"
},
"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": 48,
"rows_produced_per_join": 48,
"filtered": "100.00",
"using_index": true,
"cost_info": {
"read_cost": "5.08",
"eval_cost": "4.80",
"prefix_cost": "9.88",
"data_read_per_join": "768"
},
"used_columns": [
"product_id",
"category_id",
"link_type"
],
"attached_condition": "(`nuie_scalesta_net`.`cscart_products_categories`.`product_id` in (84640,84641,84508,84509,84574,84575,84638,84639,84636,84637,84506,84507,84572,84573,84661,84662,84504,84505,84570,84571,84634,84635,84310,84311,84502,84503,84568,84569,84529,84530,84595,84596,84665,84666,84533,84534,84599,84600,84306,84307,84308,84309,84519,84331,84332,84304,84305,84632))"
}
},
{
"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": 2,
"filtered": "5.00",
"cost_info": {
"read_cost": "12.00",
"eval_cost": "0.24",
"prefix_cost": "26.68",
"data_read_per_join": "6K"
},
"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": 2,
"filtered": "100.00",
"cost_info": {
"read_cost": "0.60",
"eval_cost": "0.24",
"prefix_cost": "27.52",
"data_read_per_join": "38"
},
"used_columns": [
"product_id",
"category_id",
"position"
]
}
}
]
}
}
}
Result
| product_id |
category_ids |
position |
| 84304 |
7223M |
0 |
| 84305 |
7223M |
0 |
| 84306 |
7223M |
0 |
| 84307 |
7223M |
0 |
| 84308 |
7223M |
0 |
| 84309 |
7223M |
0 |
| 84310 |
7223M |
0 |
| 84311 |
7223M |
0 |
| 84331 |
7223M |
0 |
| 84332 |
7223M |
0 |
| 84502 |
7223M |
0 |
| 84503 |
7223M |
0 |
| 84504 |
7223M |
0 |
| 84505 |
7223M |
0 |
| 84506 |
7223M |
0 |
| 84507 |
7223M |
0 |
| 84508 |
7223M |
0 |
| 84509 |
7223M |
0 |
| 84519 |
7223M |
0 |
| 84529 |
7223M |
0 |
| 84530 |
7223M |
0 |
| 84533 |
7223M |
0 |
| 84534 |
7223M |
0 |
| 84568 |
7223M |
0 |
| 84569 |
7223M |
0 |
| 84570 |
7223M |
0 |
| 84571 |
7223M |
0 |
| 84572 |
7223M |
0 |
| 84573 |
7223M |
0 |
| 84574 |
7223M |
0 |
| 84575 |
7223M |
0 |
| 84595 |
7223M |
0 |
| 84596 |
7223M |
0 |
| 84599 |
7223M |
0 |
| 84600 |
7223M |
0 |
| 84632 |
7223M |
0 |
| 84634 |
7223M |
0 |
| 84635 |
7223M |
0 |
| 84636 |
7223M |
0 |
| 84637 |
7223M |
0 |
| 84638 |
7223M |
0 |
| 84639 |
7223M |
0 |
| 84640 |
7223M |
0 |
| 84641 |
7223M |
0 |
| 84661 |
7223M |
0 |
| 84662 |
7223M |
0 |
| 84665 |
7223M |
0 |
| 84666 |
7223M |
0 |