Query time 0.00096
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": 73,
"filtered": 100,
"attached_condition": "cscart_products_categories.product_id in (64179,62187,60825,62022,64275,63757,63343,64277,61456,64190,60798,60914)",
"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 |
| 60798 |
1522,1542,1616,1701,1779,1889,2002M |
|
| 60825 |
1522,1542,1619,1701,1779,2002,1889M |
|
| 60914 |
1676,1917,1573M |
|
| 61456 |
2010M |
|
| 62022 |
1531,1621,1625,1809,1832,1833,1900,1899M |
|
| 62187 |
1578,1614,1837,2003,1910M |
|
| 63343 |
1531,1545,1820,1832,2003,1899M |
|
| 63757 |
1531,1551,1820,1832,2001,1899M |
|
| 64179 |
1617,1835,2001,1907M |
|
| 64190 |
1616,1835,2001,1907M |
|
| 64275 |
1531,1767,1795,1832,1833,1899,1900,2003,1901M |
|
| 64277 |
1531,1639,1795,1832,1899,2003,1901M |
|