Query time 0.00497
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": 24,
"filtered": 100,
"index_condition": "variation_group_products.group_id in (6,17,75,73,24)"
},
"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 |
55 |
996385 |
Bay Rum Soap |
Herbaria |
17 |
P |
0 |
0 |
194 |
998314 |
Burano Laundry Soap |
Herbaria |
24 |
V |
518 |
0 |
298 |
100 |
Aftershaves |
Herbaria |
6 |
P |
0 |
0 |
427 |
100 |
Aftershaves |
Herbaria |
6 |
V |
298 |
0 |
428 |
100 |
Aftershaves |
Herbaria |
6 |
V |
298 |
0 |
429 |
100 |
Aftershaves |
Herbaria |
6 |
V |
298 |
0 |
430 |
100 |
Aftershaves |
Herbaria |
6 |
V |
298 |
0 |
431 |
100 |
Aftershaves |
Herbaria |
6 |
V |
298 |
0 |
506 |
993454 |
Bay Rum Soap |
Herbaria |
17 |
V |
55 |
0 |
518 |
998734 |
Burano Laundry Soap |
Herbaria |
24 |
P |
0 |
0 |
519 |
9935 |
Burano Laundry Soap |
Herbaria |
24 |
V |
518 |
0 |
5473 |
999814 |
Big Bars |
Herbaria |
73 |
P |
0 |
1 |
5474 |
998621 |
Beta Bars |
Herbaria |
75 |
P |
0 |
1 |
504 |
998599 |
Beta Bars |
Herbaria |
75 |
V |
5474 |
2 |
1843 |
999808 |
Big Bars |
Herbaria |
73 |
V |
5473 |
2 |
1841 |
999876 |
Big Bars |
Herbaria |
73 |
V |
5473 |
3 |
1855 |
987430 |
Beta Bars |
Herbaria |
75 |
V |
5474 |
3 |
1840 |
999882 |
Big Bars |
Herbaria |
73 |
V |
5473 |
4 |
1853 |
994101 |
Beta Bars |
Herbaria |
75 |
V |
5474 |
4 |
486 |
999896 |
Big Bars |
Herbaria |
73 |
V |
5473 |
5 |
1854 |
997127 |
Beta Bars |
Herbaria |
75 |
V |
5474 |
5 |
1842 |
999903 |
Big Bars |
Herbaria |
73 |
V |
5473 |
6 |