Query time 0.00103
JSON explain
{
"query_block": {
"select_id": 1,
"table": {
"table_name": "cscart_products_categories",
"access_type": "range",
"possible_keys": ["PRIMARY", "pt"],
"key": "pt",
"key_length": "3",
"used_key_parts": ["product_id"],
"rows": 68,
"filtered": 100,
"attached_condition": "cscart_products_categories.product_id in (65005,65037,64920,65122,65064,65069,65496,65527,65525,65530,65443,65429)",
"using_index": true
},
"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", "cscart_migrate.cscart_products_categories.product_id"],
"rows": 1,
"filtered": 100
},
"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": ["cscart_migrate.cscart_products_categories.category_id"],
"rows": 1,
"filtered": 100,
"attached_condition": "cscart_categories.company_id = 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')"
}
}
}
Result
| product_id |
category_ids |
position |
| 64920 |
1587,1593,1852,2002,1930M |
|
| 65005 |
1593,1852,1930M |
|
| 65037 |
1593,1852,2002,1930M |
|
| 65064 |
1593,1852,2002,1930M |
|
| 65069 |
1593,1852,2002,1930M |
|
| 65122 |
1587,1616,1653,1804,1852,1926,2002,1930M |
|
| 65429 |
1853,1856,1934,2001,1931M |
|
| 65443 |
1853,1856,1934,2001,1931M |
|
| 65496 |
1593,1846,1852,1924,2002,1930M |
|
| 65525 |
1594,1846,1850,1928,1924M |
|
| 65527 |
1595,1603,1793,1846,1851,1924,2001,1929M |
|
| 65530 |
1793,1853,1856,1924,1934,2001,1931M |
|