Query time 0.00135
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": 100,
"filtered": 100,
"attached_condition": "cscart_products_categories.product_id in (65598,65870,65875,65689,65853,65864,65877,65874,65863,65869,65868,65862,65693,65850,65606,65604,65880,65852,65605,65692,65600,65855,65607,65599)",
"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 |
| 65598 |
1890,2002,1704M |
|
| 65599 |
1899,2002,1832M |
|
| 65600 |
1899,2002,1832M |
|
| 65604 |
1832,2002,1899M |
|
| 65605 |
1832,2002,1899M |
|
| 65606 |
1832,2002,1899M |
|
| 65607 |
1832,2002,1899M |
|
| 65689 |
1986,2001,1615M |
|
| 65692 |
1986,2001,1616M |
|
| 65693 |
1986,2002,1616M |
|
| 65850 |
1575,1839,1865,1913,1943M |
|
| 65852 |
1575,1839,1865,1913,1943M |
|
| 65853 |
1575,1839,1865,1913,1943M |
|
| 65855 |
1575,1839,1865,1913,1943M |
|
| 65862 |
1575,1839,1865,1913,1943M |
|
| 65863 |
1575,1839,1865,1913,1943M |
|
| 65864 |
1575,1839,1865,1913,1943M |
|
| 65868 |
1575,1839,1865,1913,1943M |
|
| 65869 |
1575,1839,1865,1913,1943M |
|
| 65870 |
1575,1839,1865,1913,1943M |
|
| 65874 |
1575,1839,1865,1913,1943M |
|
| 65875 |
1575,1839,1865,1913,1943M |
|
| 65877 |
1575,1839,1865,1913,1943M |
|
| 65880 |
1575,1839,1865,1913,1943M |
|