Query time 0.00101
JSON explain
{
"query_block": {
"select_id": 1,
"cost": 0.162948242,
"nested_loop": [
{
"table": {
"table_name": "cscart_products_categories",
"access_type": "range",
"possible_keys": ["PRIMARY", "pt"],
"key": "pt",
"key_length": "3",
"used_key_parts": ["product_id"],
"loops": 1,
"rows": 32,
"cost": 0.05815448,
"filtered": 100,
"attached_condition": "cscart_products_categories.product_id in (439645,401030,435106,401667,431036,442622,435820,452529,426624,403050,452048,407841,405943,459502,431667,420500,433248,407007,424261,442071,411571,430068,446914,420739,441207,438933,436348,447332,442119,424436,409550,447602)",
"using_index": true
}
},
{
"table": {
"table_name": "cscart_categories",
"access_type": "eq_ref",
"possible_keys": ["PRIMARY", "c_status", "p_category_id"],
"key": "PRIMARY",
"key_length": "3",
"used_key_parts": ["category_id"],
"ref": ["u985510652_ecartify.cscart_products_categories.category_id"],
"loops": 32,
"rows": 1,
"cost": 0.02944128,
"filtered": 100,
"attached_condition": "cscart_categories.storefront_id in (0,1) and (cscart_categories.usergroup_ids = '' or find_in_set(0,cscart_categories.usergroup_ids) or find_in_set(1,cscart_categories.usergroup_ids)) and cscart_categories.`status` in ('A','H')"
}
},
{
"table": {
"table_name": "product_position_source",
"access_type": "eq_ref",
"possible_keys": ["PRIMARY", "pt"],
"key": "PRIMARY",
"key_length": "6",
"used_key_parts": ["category_id", "product_id"],
"ref": [
"const",
"u985510652_ecartify.cscart_products_categories.product_id"
],
"loops": 32,
"rows": 1,
"cost": 0.05483648,
"filtered": 100
}
}
]
}
}
Result
| product_id |
category_ids |
position |
| 401030 |
289M |
|
| 401667 |
289M |
|
| 403050 |
289M |
|
| 405943 |
289M |
|
| 407007 |
289M |
|
| 407841 |
289M |
|
| 409550 |
289M |
|
| 411571 |
289M |
|
| 420500 |
289M |
|
| 420739 |
289M |
|
| 424261 |
305M |
|
| 424436 |
289M |
|
| 426624 |
305M |
|
| 430068 |
289M |
|
| 431036 |
289M |
|
| 431667 |
289M |
|
| 433248 |
289M |
|
| 435106 |
305M |
|
| 435820 |
289M |
|
| 436348 |
305M |
|
| 438933 |
289M |
|
| 439645 |
305M |
|
| 441207 |
289M |
|
| 442071 |
289M |
|
| 442119 |
305M |
|
| 442622 |
305M |
|
| 446914 |
289M |
|
| 447332 |
289M |
|
| 447602 |
305M |
|
| 452048 |
305M |
|
| 452529 |
305M |
|
| 459502 |
289M |
|