Query time 0.00239
JSON explain
{
"query_block": {
"select_id": 1,
"cost_info": {
"query_cost": "283.96"
},
"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": 101,
"rows_produced_per_join": 101,
"filtered": "100.00",
"using_index": true,
"cost_info": {
"read_cost": "21.36",
"eval_cost": "20.20",
"prefix_cost": "41.56",
"data_read_per_join": "1K"
},
"used_columns": [
"product_id",
"category_id",
"link_type"
],
"attached_condition": "(`webmarco`.`cscart_products_categories`.`product_id` in (430995,431087,431290,431381,431004,431231,431405,430983,431071,431497,430762,431274,431411,431495,431017,431175,431182,431434,431465,430686,430974,431045,431403,430755,430765,430785,431001,431494,430965,431025,431457,381710,430963,430966,431002,431240,431329,431343,381707,430630,430964,431243,431304,431425,430752,430773,431284,431394,430711,430961,431328,431505,431235,431362,431408,431422,431498,430971,431079,431355,431383,431015,431152,431260,431283,431407,430669,430700,430705,430759,431105,431488,430943,430978,431018,431057,431069,431340,431352,431409,430944,431217,431337,431419,435510,430929,431030,431311,430717,430781,430938,430973,431346,431427,387046,430956,431302,431415,431482,431500))"
}
},
{
"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": 101,
"filtered": "100.00",
"cost_info": {
"read_cost": "101.00",
"eval_cost": "20.20",
"prefix_cost": "162.76",
"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": "101.00",
"eval_cost": "1.01",
"prefix_cost": "283.96",
"data_read_per_join": "29K"
},
"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 |
381707 |
2578M |
|
381710 |
2578M |
|
387046 |
2578M |
|
430630 |
2601M |
|
430669 |
2601M |
|
430686 |
2601M |
|
430700 |
2601M |
|
430705 |
2601M |
|
430711 |
2601M |
|
430717 |
2601M |
|
430752 |
2601M |
|
430755 |
2601M |
|
430759 |
2601M |
|
430762 |
2601M |
|
430765 |
2601M |
|
430773 |
2601M |
|
430781 |
2601M |
|
430785 |
2601M |
|
430929 |
2601M |
|
430938 |
2601M |
|
430943 |
2601M |
|
430944 |
2601M |
|
430956 |
2601M |
|
430961 |
2601M |
|
430963 |
2601M |
|
430964 |
2601M |
|
430965 |
2601M |
|
430966 |
2601M |
|
430971 |
2601M |
|
430973 |
2601M |
|
430974 |
2601M |
|
430978 |
2601M |
|
430983 |
2601M |
|
430995 |
2601M |
|
431001 |
2601M |
|
431002 |
2601M |
|
431004 |
2601M |
|
431015 |
2601M |
|
431017 |
2601M |
|
431018 |
2601M |
|
431025 |
2601M |
|
431030 |
2601M |
|
431045 |
2601M |
|
431057 |
2601M |
|
431069 |
2601M |
|
431071 |
2601M |
|
431079 |
2601M |
|
431087 |
2601M |
|
431105 |
2601M |
|
431152 |
2601M |
|
431175 |
2601M |
|
431182 |
2601M |
|
431217 |
2601M |
|
431231 |
2601M |
|
431235 |
2601M |
|
431240 |
2601M |
|
431243 |
2601M |
|
431260 |
2601M |
|
431274 |
2601M |
|
431283 |
2601M |
|
431284 |
2601M |
|
431290 |
2601M |
|
431302 |
2601M |
|
431304 |
2601M |
|
431311 |
2601M |
|
431328 |
2601M |
|
431329 |
2601M |
|
431337 |
2601M |
|
431340 |
2601M |
|
431343 |
2601M |
|
431346 |
2601M |
|
431352 |
2601M |
|
431355 |
2601M |
|
431362 |
2601M |
|
431381 |
2601M |
|
431383 |
2601M |
|
431394 |
2601M |
|
431403 |
2601M |
|
431405 |
2601M |
|
431407 |
2601M |
|
431408 |
2601M |
|
431409 |
2601M |
|
431411 |
2601M |
|
431415 |
2601M |
|
431419 |
2601M |
|
431422 |
2601M |
|
431425 |
2601M |
|
431427 |
2601M |
|
431434 |
2601M |
|
431457 |
2601M |
|
431465 |
2601M |
|
431482 |
2601M |
|
431488 |
2601M |
|
431494 |
2601M |
|
431495 |
2601M |
|
431497 |
2601M |
|
431498 |
2601M |
|
431500 |
2601M |
|
431505 |
2601M |
|
435510 |
10669,10667M |
|