Query time 0.00218
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 (357695,350166,351109,351665,351706,352131,353415,353261,353262,353529,355225,355897,356720,349870,351281,352960,354535,356589,357067,358172,353285,353428,355773,356995,359348,353111,353326,353388,353536,354023,354674,355194,356783,357083,359109,349880,350707,352099,354960,350274,350691,350802,351185,353048,353568,353657,353844,358809,358992,349923,350701,351217,353080,353113,353335,354706,355502,357314,357321,350186,350371,355570,356147,352885,352972,353280,354363,354803,350997,354115,354961,356912,350111,351058,353682,353820,359256,349861,350443,351052,351611,355526,350239,350735,353604,355345,355513,358031,350430,351500,351729,352537,353404,353905,353991,355478,355718,357205,357787,350485))"
}
},
{
"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 |
349861 |
2916M |
|
349870 |
2916M |
|
349880 |
2916M |
|
349923 |
2916M |
|
350111 |
2916M |
|
350166 |
2916M |
|
350186 |
2916M |
|
350239 |
2913M |
|
350274 |
2913M |
|
350371 |
2913M |
|
350430 |
2913M |
|
350443 |
2913M |
|
350485 |
2913M |
|
350691 |
2920M |
|
350701 |
2920M |
|
350707 |
2920M |
|
350735 |
2920M |
|
350802 |
2920M |
|
350997 |
2920M |
|
351052 |
2920M |
|
351058 |
2920M |
|
351109 |
2920M |
|
351185 |
2920M |
|
351217 |
2920M |
|
351281 |
2916M |
|
351500 |
2920M |
|
351611 |
2916M |
|
351665 |
2920M |
|
351706 |
2920M |
|
351729 |
2916M |
|
352099 |
2916M |
|
352131 |
2916M |
|
352537 |
2916M |
|
352885 |
3408M |
|
352960 |
3105M |
|
352972 |
3408M |
|
353048 |
3105M |
|
353080 |
3105M |
|
353111 |
3105M |
|
353113 |
3408M |
|
353261 |
3408M |
|
353262 |
3408M |
|
353280 |
3105M |
|
353285 |
3408M |
|
353326 |
3408M |
|
353335 |
3408M |
|
353388 |
3408M |
|
353404 |
3105M |
|
353415 |
3408M |
|
353428 |
3408M |
|
353529 |
3408M |
|
353536 |
3408M |
|
353568 |
3105M |
|
353604 |
3105M |
|
353657 |
3105M |
|
353682 |
3408M |
|
353820 |
3105M |
|
353844 |
3105M |
|
353905 |
3408M |
|
353991 |
3105M |
|
354023 |
3105M |
|
354115 |
3105M |
|
354363 |
2916M |
|
354535 |
3105M |
|
354674 |
3105M |
|
354706 |
2916M |
|
354803 |
2916M |
|
354960 |
2920M |
|
354961 |
2920M |
|
355194 |
2920M |
|
355225 |
2920M |
|
355345 |
2920M |
|
355478 |
3105M |
|
355502 |
3105M |
|
355513 |
3105M |
|
355526 |
3105M |
|
355570 |
3408M |
|
355718 |
2916M |
|
355773 |
2916M |
|
355897 |
2916M |
|
356147 |
2920M |
|
356589 |
2916M |
|
356720 |
3105M |
|
356783 |
3105M |
|
356912 |
3105M |
|
356995 |
2920M |
|
357067 |
2920M |
|
357083 |
2920M |
|
357205 |
2920M |
|
357314 |
2920M |
|
357321 |
2920M |
|
357695 |
2920M |
|
357787 |
2920M |
|
358031 |
2920M |
|
358172 |
2920M |
|
358809 |
2916M |
|
358992 |
2916M |
|
359109 |
2920M |
|
359256 |
2920M |
|
359348 |
2920M |
|