Query time 0.00138
JSON explain
{
"query_block": {
"select_id": 1,
"cost_info": {
"query_cost": "34.59"
},
"grouping_operation": {
"using_filesort": false,
"nested_loop": [
{
"table": {
"table_name": "cscart_products_categories",
"access_type": "range",
"possible_keys": [
"PRIMARY",
"link_type",
"pt",
"idx_product_category_lookup",
"idx_products_categories_composite"
],
"key": "idx_products_categories_composite",
"used_key_parts": [
"product_id"
],
"key_length": "3",
"rows_examined_per_scan": 23,
"rows_produced_per_join": 23,
"filtered": "100.00",
"using_index": true,
"cost_info": {
"read_cost": "2.64",
"eval_cost": "2.30",
"prefix_cost": "4.94",
"data_read_per_join": "368"
},
"used_columns": [
"product_id",
"category_id",
"link_type"
],
"attached_condition": "(`cscart_db`.`cscart_products_categories`.`product_id` in (70125,31857,35900,36611,36749,38348,38923,68327,70114,70115,70116,70117,70118,70119,70120,70121,70122,70123,70124,70126,70127,70128,70129))"
}
},
{
"table": {
"table_name": "product_position_source",
"access_type": "eq_ref",
"possible_keys": [
"PRIMARY",
"pt",
"idx_product_category_lookup",
"idx_products_categories_composite"
],
"key": "PRIMARY",
"used_key_parts": [
"category_id",
"product_id"
],
"key_length": "6",
"ref": [
"const",
"cscart_db.cscart_products_categories.product_id"
],
"rows_examined_per_scan": 1,
"rows_produced_per_join": 23,
"filtered": "100.00",
"cost_info": {
"read_cost": "19.30",
"eval_cost": "2.30",
"prefix_cost": "26.54",
"data_read_per_join": "368"
},
"used_columns": [
"product_id",
"category_id",
"position"
]
}
},
{
"table": {
"table_name": "cscart_categories",
"access_type": "eq_ref",
"possible_keys": [
"PRIMARY",
"p_category_id",
"idx_categories_storefront_status",
"idx_categories_usergroup_status",
"idx_categories_status_id_path"
],
"key": "PRIMARY",
"used_key_parts": [
"category_id"
],
"key_length": "3",
"ref": [
"cscart_db.cscart_products_categories.category_id"
],
"rows_examined_per_scan": 1,
"rows_produced_per_join": 18,
"filtered": "81.96",
"cost_info": {
"read_cost": "5.75",
"eval_cost": "1.89",
"prefix_cost": "34.59",
"data_read_per_join": "52K"
},
"used_columns": [
"category_id",
"status",
"storefront_id"
],
"attached_condition": "((`cscart_db`.`cscart_categories`.`storefront_id` in (0,1)) and (`cscart_db`.`cscart_categories`.`status` in ('A','H')))"
}
}
]
}
}
}
Result
| product_id |
category_ids |
position |
| 31857 |
2682M |
|
| 35900 |
2682M |
|
| 36611 |
2682M |
|
| 36749 |
2681M |
|
| 38348 |
2682M |
|
| 38923 |
2681M |
|
| 68327 |
2681M |
|
| 70114 |
2682M |
|
| 70115 |
2682M |
|
| 70116 |
2682M |
|
| 70117 |
2682M |
|
| 70118 |
2682M |
|
| 70119 |
2682M |
|
| 70120 |
2682M |
|
| 70121 |
2682M |
|
| 70122 |
2682M |
|
| 70123 |
2682M |
|
| 70124 |
2682M |
|
| 70125 |
2682M |
|
| 70126 |
2682M |
|
| 70127 |
2682M |
|
| 70128 |
2682M |
|
| 70129 |
2682M |
|