Query time 0.00337
JSON explain
{
"query_block": {
"select_id": 1,
"cost_info": {
"query_cost": "281.15"
},
"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": 100,
"rows_produced_per_join": 100,
"filtered": "100.00",
"using_index": true,
"cost_info": {
"read_cost": "21.15",
"eval_cost": "20.00",
"prefix_cost": "41.15",
"data_read_per_join": "1K"
},
"used_columns": [
"product_id",
"category_id",
"link_type"
],
"attached_condition": "(`webmarco`.`cscart_products_categories`.`product_id` in (430732,430942,431453,430833,430985,431076,431466,431480,339768,431219,431330,430750,431210,431353,431438,431452,431481,430719,431222,431239,431380,430724,430987,431181,431241,431285,431377,431387,431447,381709,430632,430693,430727,431229,431384,431412,431440,431208,431292,431385,431502,430733,431236,431188,431281,430682,430721,431259,431224,431361,431335,431421,430699,431249,431253,431332,430701,430955,431040,431458,430951,431081,431172,431402,430731,430757,430945,431009,431263,431431,430970,431143,431170,431215,431298,431468,431472,381715,430736,431414,431442,431455,431478,381706,431364,431401,431454,430941,431180,431369,381708,430725,430954,431233,431378,431446,431014,431212,431213,431225))"
}
},
{
"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": 100,
"filtered": "100.00",
"cost_info": {
"read_cost": "100.00",
"eval_cost": "20.00",
"prefix_cost": "161.15",
"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": "100.00",
"eval_cost": "1.00",
"prefix_cost": "281.15",
"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 |
339768 |
395M |
|
381706 |
2578M |
|
381708 |
2578M |
|
381709 |
2578M |
|
381715 |
2578M |
|
430632 |
2601M |
|
430682 |
2601M |
|
430693 |
2601M |
|
430699 |
2601M |
|
430701 |
2601M |
|
430719 |
2601M |
|
430721 |
2601M |
|
430724 |
2601M |
|
430725 |
2601M |
|
430727 |
2601M |
|
430731 |
2601M |
|
430732 |
2601M |
|
430733 |
2601M |
|
430736 |
2601M |
|
430750 |
2601M |
|
430757 |
2601M |
|
430833 |
2601M |
|
430941 |
2601M |
|
430942 |
2601M |
|
430945 |
2601M |
|
430951 |
2601M |
|
430954 |
2601M |
|
430955 |
2601M |
|
430970 |
2601M |
|
430985 |
2601M |
|
430987 |
2601M |
|
431009 |
2601M |
|
431014 |
2601M |
|
431040 |
2601M |
|
431076 |
2601M |
|
431081 |
2601M |
|
431143 |
2601M |
|
431170 |
2601M |
|
431172 |
2601M |
|
431180 |
2601M |
|
431181 |
2601M |
|
431188 |
2601M |
|
431208 |
2601M |
|
431210 |
2601M |
|
431212 |
2601M |
|
431213 |
2601M |
|
431215 |
2601M |
|
431219 |
2601M |
|
431222 |
2601M |
|
431224 |
2601M |
|
431225 |
2601M |
|
431229 |
2601M |
|
431233 |
2601M |
|
431236 |
2601M |
|
431239 |
2601M |
|
431241 |
2601M |
|
431249 |
2601M |
|
431253 |
2601M |
|
431259 |
2601M |
|
431263 |
2601M |
|
431281 |
2601M |
|
431285 |
2601M |
|
431292 |
2601M |
|
431298 |
2601M |
|
431330 |
2601M |
|
431332 |
2601M |
|
431335 |
2601M |
|
431353 |
2601M |
|
431361 |
2601M |
|
431364 |
2601M |
|
431369 |
2601M |
|
431377 |
2601M |
|
431378 |
2601M |
|
431380 |
2601M |
|
431384 |
2601M |
|
431385 |
2601M |
|
431387 |
2601M |
|
431401 |
2601M |
|
431402 |
2601M |
|
431412 |
2601M |
|
431414 |
2601M |
|
431421 |
2601M |
|
431431 |
2601M |
|
431438 |
2601M |
|
431440 |
2601M |
|
431442 |
2601M |
|
431446 |
2601M |
|
431447 |
2601M |
|
431452 |
2601M |
|
431453 |
2601M |
|
431454 |
2601M |
|
431455 |
2601M |
|
431458 |
2601M |
|
431466 |
2601M |
|
431468 |
2601M |
|
431472 |
2601M |
|
431478 |
2601M |
|
431480 |
2601M |
|
431481 |
2601M |
|
431502 |
2601M |
|