Query time 0.00044
JSON explain
{
"query_block": {
"select_id": 1,
"cost": 0.086542963,
"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": 24,
"cost": 0.02497204,
"filtered": 100,
"attached_condition": "cscart_products_categories.product_id in (1825,1826,1827,1828,1829,1830,1831,1300,1301,1302,1304,1303,1812,1808,1807,1813,1836,1860,1861,1837,1851,1853,1838,1839)",
"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_dev.cscart_products_categories.category_id"],
"loops": 24,
"rows": 1,
"cost": 0.02228576,
"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_dev.cscart_products_categories.product_id"
],
"loops": 24,
"rows": 1,
"cost": 0.02392416,
"filtered": 100
}
}
]
}
}
Result
| product_id |
category_ids |
position |
| 1300 |
267M |
0 |
| 1301 |
267M |
0 |
| 1302 |
267M |
0 |
| 1303 |
267M |
0 |
| 1304 |
267M |
0 |
| 1807 |
267M |
0 |
| 1808 |
267M |
0 |
| 1812 |
267M |
0 |
| 1813 |
267M |
0 |
| 1825 |
267M |
0 |
| 1826 |
267M |
0 |
| 1827 |
267M |
0 |
| 1828 |
267M |
0 |
| 1829 |
267M |
0 |
| 1830 |
267M |
0 |
| 1831 |
267M |
0 |
| 1836 |
267M |
0 |
| 1837 |
267M |
0 |
| 1838 |
267M |
0 |
| 1839 |
267M |
0 |
| 1851 |
267M |
0 |
| 1853 |
267M |
0 |
| 1860 |
267M |
0 |
| 1861 |
267M |
0 |