Query time 0.00311
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 (339707,392169,339656,430908,339769,339807,431115,431133,339829,339758,339677,339809,431050,339729,381702,431150,430747,431026,339648,431158,430681,339851,431195,339479,430748,339847,381696,431122,339654,339712,339746,430907,431102,430924,430998,387047,339704,339735,430648,339664,430696,431201,430771,339760,430916,339485,339817,430824,430915,339720,430636,430638,430823,431139,339812,430743,430857,430646,430813,430935,430803,431120,430821,339714,339835,430831,431145,431151,430665,339668,381698,339715,339761,430649,430751,387049,339671,339820,381699,430647,430848,431127,431109,430766,339694,339650,430903,339593,431114,430660,430817,431097,431163,431194,339849,431103,430902,430912,339755,430807))"
}
},
{
"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 |
339479 |
9940M |
|
339485 |
9940M |
|
339593 |
395M |
|
339648 |
395M |
|
339650 |
395M |
|
339654 |
395M |
|
339656 |
395M |
|
339664 |
395M |
|
339668 |
395M |
|
339671 |
395M |
|
339677 |
395M |
|
339694 |
395M |
|
339704 |
395M |
|
339707 |
395M |
|
339712 |
395M |
|
339714 |
395M |
|
339715 |
395M |
|
339720 |
395M |
|
339729 |
9940M |
|
339735 |
395M |
|
339746 |
395M |
|
339755 |
395M |
|
339758 |
395M |
|
339760 |
395M |
|
339761 |
395M |
|
339769 |
395M |
|
339807 |
9940M |
|
339809 |
9940M |
|
339812 |
9940M |
|
339817 |
395M |
|
339820 |
395M |
|
339829 |
395M |
|
339835 |
395M |
|
339847 |
395M |
|
339849 |
395M |
|
339851 |
395M |
|
381696 |
10411M |
|
381698 |
10410M |
|
381699 |
10410M |
|
381702 |
10410M |
|
387047 |
2578M |
|
387049 |
2578M |
|
392169 |
2577M |
|
430636 |
2601M |
|
430638 |
2601M |
|
430646 |
2601M |
|
430647 |
2601M |
|
430648 |
2601M |
|
430649 |
2601M |
|
430660 |
2601M |
|
430665 |
2601M |
|
430681 |
2601M |
|
430696 |
2601M |
|
430743 |
2601M |
|
430747 |
2601M |
|
430748 |
2601M |
|
430751 |
2601M |
|
430766 |
2601M |
|
430771 |
2601M |
|
430803 |
2601M |
|
430807 |
2601M |
|
430813 |
2601M |
|
430817 |
2601M |
|
430821 |
2601M |
|
430823 |
2601M |
|
430824 |
2601M |
|
430831 |
2601M |
|
430848 |
2601M |
|
430857 |
2601M |
|
430902 |
2601M |
|
430903 |
2601M |
|
430907 |
2601M |
|
430908 |
2601M |
|
430912 |
2601M |
|
430915 |
2601M |
|
430916 |
2601M |
|
430924 |
2601M |
|
430935 |
2601M |
|
430998 |
2601M |
|
431026 |
2601M |
|
431050 |
2601M |
|
431097 |
2601M |
|
431102 |
2601M |
|
431103 |
2601M |
|
431109 |
2601M |
|
431114 |
2601M |
|
431115 |
2601M |
|
431120 |
2601M |
|
431122 |
2601M |
|
431127 |
2601M |
|
431133 |
2601M |
|
431139 |
2601M |
|
431145 |
2601M |
|
431150 |
2601M |
|
431151 |
2601M |
|
431158 |
2601M |
|
431163 |
2601M |
|
431194 |
2601M |
|
431195 |
2601M |
|
431201 |
2601M |
|