Query time 0.04065
JSON explain
{
"query_block": {
"select_id": 1,
"filesort": {
"sort_key": "if(NULL is not null,NULL,descr1.product), products.product_id",
"temporary_table": {
"table": {
"table_name": "shared_descr",
"access_type": "system",
"possible_keys": ["PRIMARY", "product_id", "company_id"],
"rows": 0,
"filtered": 0,
"const_row_not_found": true
},
"table": {
"table_name": "prices",
"access_type": "index",
"possible_keys": [
"usergroup",
"product_id",
"lower_limit",
"usergroup_id"
],
"key": "usergroup",
"key_length": "9",
"used_key_parts": ["product_id", "usergroup_id", "lower_limit"],
"rows": 1699,
"filtered": 99.23484039,
"attached_condition": "prices.lower_limit = 1 and prices.usergroup_id in (0,0,1)",
"using_index": true
},
"table": {
"table_name": "products",
"access_type": "eq_ref",
"possible_keys": ["PRIMARY", "status", "idx_parent_product_id"],
"key": "PRIMARY",
"key_length": "3",
"used_key_parts": ["product_id"],
"ref": ["noframes_angrybeaver.prices.product_id"],
"rows": 1,
"filtered": 96.7084198,
"attached_condition": "products.parent_product_id = 0 and (products.amount > 0 or products.tracking = 'D') and (products.usergroup_ids = '' or find_in_set(0,products.usergroup_ids) or find_in_set(1,products.usergroup_ids)) and products.`status` = 'A'"
},
"table": {
"table_name": "descr1",
"access_type": "eq_ref",
"possible_keys": ["PRIMARY", "product_id"],
"key": "PRIMARY",
"key_length": "9",
"used_key_parts": ["product_id", "lang_code"],
"ref": ["noframes_angrybeaver.prices.product_id", "const"],
"rows": 1,
"filtered": 100,
"attached_condition": "trigcond(descr1.lang_code = 'ru')"
},
"table": {
"table_name": "products_categories",
"access_type": "ref",
"possible_keys": ["PRIMARY", "pt"],
"key": "pt",
"key_length": "3",
"used_key_parts": ["product_id"],
"ref": ["noframes_angrybeaver.prices.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": ["noframes_angrybeaver.products_categories.category_id"],
"rows": 1,
"filtered": 100,
"index_condition": "cscart_categories.category_id in (265,266,267,268,269,270,271,272,273,275,277,278,279,280,283,285,286,291,294,299,301,308,309,313,323,325,327,334,351,370,393,431,432,434,439,442,455,459,1151,667,700,708,775,784,787,1555,1559,1560,1561,1562,1565,1567,1570,1571,1574,1579,1584,1585,1589,1590,1591,1598,1601,1602,1606,1607,1612,1614,1618,1619,1621,1622,1628,1629,1630,1636,1637,1638,1641,1688,1643,1644,1645,1646,1647,1648,1649,1650,1651,1652,1654,1655,1656,1657,1658,1659,1660,1661,1662,1663,1664,1665,1666,1668,1669,1671,1672,1673,1674,1675,1676,1677,1678,1679,1680,1681,1682,1683,1684,1685,1687)",
"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)"
},
"block-nl-join": {
"table": {
"table_name": "companies",
"access_type": "ALL",
"possible_keys": ["PRIMARY"],
"rows": 2,
"filtered": 100,
"attached_condition": "companies.`status` = 'A'"
},
"buffer_type": "flat",
"buffer_size": "2048Kb",
"join_type": "BNL",
"attached_condition": "companies.company_id = products.company_id"
}
}
}
}
}
Result
| product_id |
product |
company_name |
product_type |
parent_product_id |
| 9846 |
Гравитация col.08 |
NoFrames |
P |
0 |
| 9845 |
Гравитация col.09 |
NoFrames |
P |
0 |
| 9860 |
Гравитация col.10 |
NoFrames |
P |
0 |
| 9859 |
Гравитация col.11 |
NoFrames |
P |
0 |
| 9858 |
Гравитация col.12 |
NoFrames |
P |
0 |
| 9857 |
Гравитация col.13 |
NoFrames |
P |
0 |
| 9852 |
Гравитация col.14 |
NoFrames |
P |
0 |
| 9861 |
Гравитация col.15 |
NoFrames |
P |
0 |
| 9862 |
Гравитация col.16 |
NoFrames |
P |
0 |
| 9847 |
Гравитация col.17 |
NoFrames |
P |
0 |
| 9863 |
Гравитация col.18 |
NoFrames |
P |
0 |
| 9856 |
Гравитация col.19 |
NoFrames |
P |
0 |
| 9855 |
Гравитация col.20 |
NoFrames |
P |
0 |
| 9838 |
Гравитация col.21 |
NoFrames |
P |
0 |
| 9849 |
Гравитация col.22 |
NoFrames |
P |
0 |
| 9850 |
Гравитация col.23 |
NoFrames |
P |
0 |
| 9853 |
Гравитация col.24 |
NoFrames |
P |
0 |
| 9842 |
Гравитация col.25 |
NoFrames |
P |
0 |
| 9851 |
Гравитация col.26 |
NoFrames |
P |
0 |
| 9854 |
Гравитация col.27 |
NoFrames |
P |
0 |
| 10263 |
Гравитация col.28 |
NoFrames |
P |
0 |
| 10264 |
Гравитация col.29 |
NoFrames |
P |
0 |
| 10265 |
Гравитация col.30 |
NoFrames |
P |
0 |
| 10266 |
Гравитация col.31 |
NoFrames |
P |
0 |
| 10267 |
Гравитация col.32 |
NoFrames |
P |
0 |
| 10268 |
Гравитация col.33 |
NoFrames |
P |
0 |
| 10269 |
Гравитация col.34 |
NoFrames |
P |
0 |
| 10270 |
Гравитация col.35 |
NoFrames |
P |
0 |
| 10271 |
Гравитация col.36 |
NoFrames |
P |
0 |
| 10272 |
Гравитация col.37 |
NoFrames |
P |
0 |
| 10273 |
Гравитация col.38 |
NoFrames |
P |
0 |
| 15943 |
Комплект подушек №1 |
NoFrames |
P |
0 |
| 15951 |
Комплект подушек №10 |
NoFrames |
P |
0 |
| 15952 |
Комплект подушек №11 |
NoFrames |
P |
0 |
| 15956 |
Комплект подушек №16 |
NoFrames |
P |
0 |
| 15958 |
Комплект подушек №18 |
NoFrames |
P |
0 |
| 15959 |
Комплект подушек №19 |
NoFrames |
P |
0 |
| 15944 |
Комплект подушек №2 |
NoFrames |
P |
0 |
| 15960 |
Комплект подушек №20 |
NoFrames |
P |
0 |
| 15961 |
Комплект подушек №21 |
NoFrames |
P |
0 |
| 15962 |
Комплект подушек №22 |
NoFrames |
P |
0 |
| 15966 |
Комплект подушек №26 |
NoFrames |
P |
0 |
| 15957 |
Комплект подушек №27 |
NoFrames |
P |
0 |
| 15965 |
Комплект подушек №28 |
NoFrames |
P |
0 |
| 15945 |
Комплект подушек №3 |
NoFrames |
P |
0 |
| 15938 |
Комплект подушек №30 |
NoFrames |
P |
0 |
| 15968 |
Комплект подушек №31 |
NoFrames |
P |
0 |
| 15946 |
Комплект подушек №4 |
NoFrames |
P |
0 |
| 15947 |
Комплект подушек №5 |
NoFrames |
P |
0 |
| 15949 |
Комплект подушек №8 |
NoFrames |
P |
0 |
| 15950 |
Комплект подушек №9 |
NoFrames |
P |
0 |
| 12520 |
Подушка декоративная "Akcent 01 Белый кант" 50х50 |
NoFrames |
P |
0 |
| 12497 |
Подушка декоративная "Akcent 01" 30х50 |
NoFrames |
P |
0 |
| 12528 |
Подушка декоративная "Akcent 02" 30х50 |
NoFrames |
P |
0 |
| 12512 |
Подушка декоративная "Akcent 02" 50х50 |
NoFrames |
P |
0 |
| 12511 |
Подушка декоративная "Aurora 02 Рыжий кант" 50х50 |
NoFrames |
P |
0 |
| 12527 |
Подушка декоративная "Aurora 02 Серый кант" 30х50 |
NoFrames |
P |
0 |
| 10580 |
Подушка декоративная "Bella Vita 02" 30x50 |
NoFrames |
P |
0 |
| 10579 |
Подушка декоративная "Bella Vita 06" 30x50 |
NoFrames |
P |
0 |
| 9936 |
Подушка декоративная "Bella Vita 13" 45x45 |
NoFrames |
P |
0 |
| 9931 |
Подушка декоративная "Bella Vita 14" 45x45 |
NoFrames |
P |
0 |
| 12521 |
Подушка декоративная "Del Vento 01" 30х50 |
NoFrames |
P |
0 |
| 12504 |
Подушка декоративная "Desert 01" 30х50 |
NoFrames |
P |
0 |
| 12502 |
Подушка декоративная "Desert 02" 30х50 |
NoFrames |
P |
0 |