Query time 0.00107
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": 95,
"filtered": 100,
"attached_condition": "cscart_products_categories.product_id in (65705,65561,64614,60731,60726,60750,60734,61388,64622,60741,64623,64626,60747,62254,60730,65704,62260,65523,60740,61387,60742,65662,61171,64941)",
"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 |
| 60726 |
1675,1916,1576M |
|
| 60730 |
1675,1916,1576M |
|
| 60731 |
1675,1916,1576M |
|
| 60734 |
1675,1916,1576M |
|
| 60740 |
1675,1916,1576M |
|
| 60741 |
1675,1916,1576M |
|
| 60742 |
1675,1916,1576M |
|
| 60747 |
1675,1916,1576M |
|
| 60750 |
1675,1916,1576M |
|
| 61171 |
1675,1916,1576M |
|
| 61387 |
1675,1916,1576M |
|
| 61388 |
1675,1916,1576M |
|
| 62254 |
1840,1918,1573M |
|
| 62260 |
1676,1917,1573M |
|
| 64614 |
1612,1839,1865,1913,1943,1575M |
|
| 64622 |
1612,1839,1865,1913,1943,1575M |
|
| 64623 |
1612,1839,1865,1913,1943,1575M |
|
| 64626 |
1612,1839,1865,1913,1943,1575M |
|
| 64941 |
1759,1840,1918,1573M |
|
| 65523 |
1542,1620,1701,1793,1882,2002,1889M |
|
| 65561 |
1542,1701,2002,1889M |
|
| 65662 |
1542,1701,1844,1889,1922,1983,2002,1985M |
|
| 65704 |
1986,2001,1617M |
|
| 65705 |
1986,2002,1617M |
|