Query time 0.00256
JSON explain
{
"query_block": {
"select_id": 1,
"cost_info": {
"query_cost": "109.29"
},
"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": 192,
"rows_produced_per_join": 192,
"filtered": "100.00",
"using_index": true,
"cost_info": {
"read_cost": "19.53",
"eval_cost": "19.20",
"prefix_cost": "38.73",
"data_read_per_join": "3K"
},
"used_columns": [
"product_id",
"category_id",
"link_type"
],
"attached_condition": "(`nuie_scalesta_net`.`cscart_products_categories`.`product_id` in (94582,94853,95756,95758,95770,95771,95772,95774,95775,95776,95824,95825,95826,96573,97608,97610,97611,97612,97613,97614,97615,97617,97618,97629,97630,97631,97633,97635,97636,97637,97640,97641,97642,97643,97644,97645,97646,97647,97648,97649,97650,97651,97652,97653,97654,97655,97656,97657,97658,97659,97660,97661,97662,97663,97664,97665,97666,97667,97668,97669,97670,97671,97672,97673,97674,97675,97676,97677,97678,97679,97680,97681,97697,97699,97700,97701,97702,97706,99112,99115,99116,99118,99119,99130,99132,99134,99143,99164,99166,99173,99175,99180,99192,99194,99197,99200))"
}
},
{
"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": [
"nuie_scalesta_net.cscart_products_categories.category_id"
],
"rows_examined_per_scan": 1,
"rows_produced_per_join": 9,
"filtered": "5.00",
"cost_info": {
"read_cost": "48.00",
"eval_cost": "0.96",
"prefix_cost": "105.93",
"data_read_per_join": "25K"
},
"used_columns": [
"category_id",
"usergroup_ids",
"status",
"storefront_id"
],
"attached_condition": "((`nuie_scalesta_net`.`cscart_categories`.`storefront_id` in (0,1)) and ((`nuie_scalesta_net`.`cscart_categories`.`usergroup_ids` = '') or (0 <> find_in_set(0,`nuie_scalesta_net`.`cscart_categories`.`usergroup_ids`)) or (0 <> find_in_set(1,`nuie_scalesta_net`.`cscart_categories`.`usergroup_ids`))) and (`nuie_scalesta_net`.`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",
"nuie_scalesta_net.cscart_products_categories.product_id"
],
"rows_examined_per_scan": 1,
"rows_produced_per_join": 9,
"filtered": "100.00",
"cost_info": {
"read_cost": "2.40",
"eval_cost": "0.96",
"prefix_cost": "109.29",
"data_read_per_join": "153"
},
"used_columns": [
"product_id",
"category_id",
"position"
]
}
}
]
}
}
}
Result
| product_id |
category_ids |
position |
| 94582 |
7320,7260M |
0 |
| 94853 |
7320,7260M |
0 |
| 95756 |
7320,7260M |
0 |
| 95758 |
7320,7260M |
0 |
| 95770 |
7320,7260M |
0 |
| 95771 |
7320,7260M |
0 |
| 95772 |
7320,7260M |
0 |
| 95774 |
7320,7260M |
0 |
| 95775 |
7320,7260M |
0 |
| 95776 |
7320,7260M |
0 |
| 95824 |
7320,7260M |
0 |
| 95825 |
7320,7260M |
0 |
| 95826 |
7320,7260M |
0 |
| 96573 |
7320,7260M |
0 |
| 97608 |
7320,7260M |
0 |
| 97610 |
7320,7260M |
0 |
| 97611 |
7320,7260M |
0 |
| 97612 |
7320,7260M |
0 |
| 97613 |
7320,7260M |
0 |
| 97614 |
7320,7260M |
0 |
| 97615 |
7320,7260M |
0 |
| 97617 |
7320,7260M |
0 |
| 97618 |
7320,7260M |
0 |
| 97629 |
7320,7260M |
0 |
| 97630 |
7320,7260M |
0 |
| 97631 |
7320,7260M |
0 |
| 97633 |
7320,7260M |
0 |
| 97635 |
7320,7260M |
0 |
| 97636 |
7320,7260M |
0 |
| 97637 |
7320,7260M |
0 |
| 97640 |
7320,7260M |
0 |
| 97641 |
7320,7260M |
0 |
| 97642 |
7320,7260M |
0 |
| 97643 |
7320,7260M |
0 |
| 97644 |
7320,7260M |
0 |
| 97645 |
7320,7260M |
0 |
| 97646 |
7320,7260M |
0 |
| 97647 |
7320,7260M |
0 |
| 97648 |
7320,7260M |
0 |
| 97649 |
7320,7260M |
0 |
| 97650 |
7320,7260M |
0 |
| 97651 |
7320,7260M |
0 |
| 97652 |
7320,7260M |
0 |
| 97653 |
7320,7260M |
0 |
| 97654 |
7320,7260M |
0 |
| 97655 |
7320,7260M |
0 |
| 97656 |
7320,7260M |
0 |
| 97657 |
7320,7260M |
0 |
| 97658 |
7320,7260M |
0 |
| 97659 |
7320,7260M |
0 |
| 97660 |
7320,7260M |
0 |
| 97661 |
7320,7260M |
0 |
| 97662 |
7320,7260M |
0 |
| 97663 |
7320,7260M |
0 |
| 97664 |
7320,7260M |
0 |
| 97665 |
7320,7260M |
0 |
| 97666 |
7320,7260M |
0 |
| 97667 |
7320,7260M |
0 |
| 97668 |
7320,7260M |
0 |
| 97669 |
7320,7260M |
0 |
| 97670 |
7320,7260M |
0 |
| 97671 |
7320,7260M |
0 |
| 97672 |
7320,7260M |
0 |
| 97673 |
7320,7260M |
0 |
| 97674 |
7320,7260M |
0 |
| 97675 |
7320,7260M |
0 |
| 97676 |
7320,7260M |
0 |
| 97677 |
7320,7260M |
0 |
| 97678 |
7320,7260M |
0 |
| 97679 |
7320,7260M |
0 |
| 97680 |
7320,7260M |
0 |
| 97681 |
7320,7260M |
0 |
| 97697 |
7320,7260M |
0 |
| 97699 |
7320,7260M |
0 |
| 97700 |
7320,7260M |
0 |
| 97701 |
7320,7260M |
0 |
| 97702 |
7320,7260M |
0 |
| 97706 |
7320,7260M |
0 |
| 99112 |
7320,7260M |
0 |
| 99115 |
7320,7260M |
0 |
| 99116 |
7320,7260M |
0 |
| 99118 |
7320,7260M |
0 |
| 99119 |
7320,7260M |
0 |
| 99130 |
7320,7260M |
0 |
| 99132 |
7320,7260M |
0 |
| 99134 |
7320,7260M |
0 |
| 99143 |
7320,7260M |
0 |
| 99164 |
7320,7260M |
0 |
| 99166 |
7320,7260M |
0 |
| 99173 |
7320,7260M |
0 |
| 99175 |
7320,7260M |
0 |
| 99180 |
7320,7260M |
0 |
| 99192 |
7320,7260M |
0 |
| 99194 |
7320,7260M |
0 |
| 99197 |
7320,7260M |
0 |
| 99200 |
7320,7260M |
0 |