Query time 0.00118
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": 65,
"filtered": 100,
"attached_condition": "cscart_products_categories.product_id in (64294,64193,61070,62436,61072,62840,64052,64149,62670,63806,64295,64778)",
"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 |
| 61070 |
1542,1637,1701,1889M |
|
| 61072 |
1542,1619,2001,1889M |
|
| 62436 |
1530,1602,1620,1624,1697,1897M |
|
| 62670 |
2010M |
|
| 62840 |
1544,1660,1662,1771,1794,1829,1894,2003,1893M |
|
| 63806 |
1544,1610,1662,1705,1748,2003,1894M |
|
| 64052 |
2010M |
|
| 64149 |
1531,1761,1808,1834,2002,1902M |
|
| 64193 |
1526,1538,1620,1666,1835,2001,1907M |
|
| 64294 |
1614,1835,2001,1907M |
|
| 64295 |
1617,1835,2001,1907M |
|
| 64778 |
1522,1542,1614,1646,1701,1889M |
|