Query time 0.00136
JSON explain
{
"query_block": {
"select_id": 1,
"cost_info": {
"query_cost": "148.25"
},
"grouping_operation": {
"using_filesort": false,
"nested_loop": [
{
"table": {
"table_name": "cscart_products_categories",
"access_type": "range",
"possible_keys": [
"PRIMARY",
"pt"
],
"key": "pt",
"used_key_parts": [
"product_id"
],
"key_length": "3",
"rows_examined_per_scan": 174,
"rows_produced_per_join": 174,
"filtered": "100.00",
"index_condition": "(`softwarepirmam_hewadelivard_cscart_4`.`cscart_products_categories`.`product_id` in (10567,10568,10570,10445,10478,10440,11588,11597,11608,10442,11560,11580,11609,11623,11624,11625,11589,11591,11596,11604,11611,11626,11627,11628))",
"cost_info": {
"read_cost": "66.91",
"eval_cost": "17.40",
"prefix_cost": "84.31",
"data_read_per_join": "2K"
},
"used_columns": [
"product_id",
"category_id",
"link_type"
]
}
},
{
"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": [
"softwarepirmam_hewadelivard_cscart_4.cscart_products_categories.category_id"
],
"rows_examined_per_scan": 1,
"rows_produced_per_join": 8,
"filtered": "5.00",
"cost_info": {
"read_cost": "43.50",
"eval_cost": "0.87",
"prefix_cost": "145.21",
"data_read_per_join": "27K"
},
"used_columns": [
"category_id",
"storefront_id",
"usergroup_ids",
"status"
],
"attached_condition": "((`softwarepirmam_hewadelivard_cscart_4`.`cscart_categories`.`storefront_id` in (0,1)) and ((`softwarepirmam_hewadelivard_cscart_4`.`cscart_categories`.`usergroup_ids` = '') or (0 <> find_in_set(0,`softwarepirmam_hewadelivard_cscart_4`.`cscart_categories`.`usergroup_ids`)) or (0 <> find_in_set(1,`softwarepirmam_hewadelivard_cscart_4`.`cscart_categories`.`usergroup_ids`))) and (`softwarepirmam_hewadelivard_cscart_4`.`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",
"softwarepirmam_hewadelivard_cscart_4.cscart_products_categories.product_id"
],
"rows_examined_per_scan": 1,
"rows_produced_per_join": 8,
"filtered": "100.00",
"cost_info": {
"read_cost": "2.18",
"eval_cost": "0.87",
"prefix_cost": "148.26",
"data_read_per_join": "139"
},
"used_columns": [
"product_id",
"category_id",
"position"
]
}
}
]
}
}
}
Result
| product_id |
category_ids |
position |
| 10440 |
344M |
|
| 10442 |
451M |
|
| 10445 |
344M |
|
| 10478 |
344M |
|
| 10567 |
174,453M |
|
| 10568 |
174,453M |
|
| 10570 |
453,174M |
|
| 11560 |
603M |
|
| 11580 |
449M |
|
| 11588 |
449M |
|
| 11589 |
449M |
|
| 11591 |
449M |
|
| 11596 |
449M |
|
| 11597 |
449M |
|
| 11604 |
449M |
|
| 11608 |
449M |
|
| 11609 |
449M |
|
| 11611 |
449M |
|
| 11623 |
448M |
|
| 11624 |
448M |
|
| 11625 |
448M |
|
| 11626 |
448M |
|
| 11627 |
448M |
|
| 11628 |
448M |
|