Query time 0.00274
JSON explain
{
"query_block": {
"select_id": 1,
"filesort": {
"sort_key": "cp_variation_group_products.position, products.product_id",
"temporary_table": {
"table": {
"table_name": "companies",
"access_type": "system",
"possible_keys": ["PRIMARY"],
"rows": 1,
"filtered": 100
},
"table": {
"table_name": "variation_group_products",
"access_type": "range",
"possible_keys": ["PRIMARY", "idx_group_id"],
"key": "idx_group_id",
"key_length": "3",
"used_key_parts": ["group_id"],
"rows": 11,
"filtered": 100,
"index_condition": "variation_group_products.group_id in (75,30,18)"
},
"table": {
"table_name": "products",
"access_type": "eq_ref",
"possible_keys": ["PRIMARY", "status"],
"key": "PRIMARY",
"key_length": "3",
"used_key_parts": ["product_id"],
"ref": ["herbaria_cscart_4_18.variation_group_products.product_id"],
"rows": 1,
"filtered": 100,
"attached_condition": "products.company_id = 1 and (products.usergroup_ids = '' or find_in_set(0,products.usergroup_ids) or find_in_set(1,products.usergroup_ids)) and (products.`status` = 'A' or products.`status` in ('A','H'))"
},
"table": {
"table_name": "shared_descr",
"access_type": "eq_ref",
"possible_keys": ["PRIMARY", "product_id", "company_id"],
"key": "PRIMARY",
"key_length": "13",
"used_key_parts": ["product_id", "lang_code", "company_id"],
"ref": [
"herbaria_cscart_4_18.variation_group_products.product_id",
"const",
"const"
],
"rows": 1,
"filtered": 100,
"attached_condition": "trigcond(shared_descr.lang_code = 'en')"
},
"table": {
"table_name": "cp_variation_group_products",
"access_type": "ref",
"possible_keys": ["PRIMARY"],
"key": "PRIMARY",
"key_length": "3",
"used_key_parts": ["product_id"],
"ref": ["herbaria_cscart_4_18.variation_group_products.product_id"],
"rows": 1,
"filtered": 100
},
"table": {
"table_name": "descr1",
"access_type": "eq_ref",
"possible_keys": ["PRIMARY"],
"key": "PRIMARY",
"key_length": "9",
"used_key_parts": ["product_id", "lang_code"],
"ref": [
"herbaria_cscart_4_18.variation_group_products.product_id",
"const"
],
"rows": 1,
"filtered": 100,
"attached_condition": "trigcond(products.`status` = 'A' or products.`status` in ('A','H') and descr1.product like '%Free%') and trigcond(descr1.lang_code = 'en')"
},
"table": {
"table_name": "products_categories",
"access_type": "ref",
"possible_keys": ["PRIMARY", "pt"],
"key": "pt",
"key_length": "3",
"used_key_parts": ["product_id"],
"ref": ["herbaria_cscart_4_18.variation_group_products.product_id"],
"rows": 4,
"filtered": 100
},
"table": {
"table_name": "cscart_categories",
"access_type": "eq_ref",
"possible_keys": ["PRIMARY", "c_status"],
"key": "PRIMARY",
"key_length": "3",
"used_key_parts": ["category_id"],
"ref": ["herbaria_cscart_4_18.products_categories.category_id"],
"rows": 1,
"filtered": 100,
"attached_condition": "(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') and cscart_categories.storefront_id in (0,1)"
}
}
}
}
}
Result
product_id |
amount |
product |
company_name |
variation_group_id |
product_type |
parent_product_id |
variation_position |
73 |
986342 |
Lavender Oatmeal Soaps |
Herbaria |
18 |
P |
0 |
0 |
303 |
997954 |
LaRee's Scent Free Soap |
Herbaria |
30 |
P |
0 |
0 |
507 |
993671 |
Lavender Oatmeal Soaps |
Herbaria |
18 |
V |
73 |
0 |
508 |
996980 |
Lavender Oatmeal Soaps |
Herbaria |
18 |
V |
73 |
0 |
537 |
993654 |
LaRee's Scent Free Soap |
Herbaria |
30 |
V |
303 |
0 |
5474 |
998621 |
Beta Bars |
Herbaria |
75 |
P |
0 |
1 |
504 |
998599 |
Beta Bars |
Herbaria |
75 |
V |
5474 |
2 |
1855 |
987430 |
Beta Bars |
Herbaria |
75 |
V |
5474 |
3 |
1853 |
994101 |
Beta Bars |
Herbaria |
75 |
V |
5474 |
4 |
1854 |
997127 |
Beta Bars |
Herbaria |
75 |
V |
5474 |
5 |