Query time 0.00102
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": 57,
"filtered": 100,
"attached_condition": "cscart_products_categories.product_id in (65535,65674,65465,65418,65536,65423,65455,65700,65453,65625,64815,65691)",
"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 |
| 64815 |
1840,1918,1573M |
|
| 65418 |
1618,1703,1708,1905,2001,1892M |
|
| 65423 |
1627,1703,1708,1905,2001,1892M |
|
| 65453 |
1703,1708,1892,1905,2001,1634M |
|
| 65455 |
1635,1703,1708,1905,2001,1892M |
|
| 65465 |
1644,1703,1708,1892,1905,2001,1648M |
|
| 65535 |
1547,1889,1757M |
|
| 65536 |
1547,1889,1758M |
|
| 65625 |
1537,1934,1905M |
|
| 65674 |
1655,1704,1708,1878,1905,1979,2001,1890M |
|
| 65691 |
1986,2001,1616M |
|
| 65700 |
1986,2001,1623M |
|