Query time 0.00667
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": "cscart_categories",
"access_type": "range",
"possible_keys": ["PRIMARY", "c_status", "p_category_id"],
"key": "PRIMARY",
"key_length": "3",
"used_key_parts": ["category_id"],
"rows": 3,
"filtered": 100,
"index_condition": "cscart_categories.category_id in (271,272,275)",
"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)"
},
"table": {
"table_name": "products_categories",
"access_type": "ref",
"possible_keys": ["PRIMARY", "pt"],
"key": "PRIMARY",
"key_length": "3",
"used_key_parts": ["category_id"],
"ref": ["noframes_angrybeaver.cscart_categories.category_id"],
"rows": 53,
"filtered": 100,
"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.products_categories.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.products_categories.product_id", "const"],
"rows": 1,
"filtered": 100,
"attached_condition": "trigcond(descr1.lang_code = 'ru')"
},
"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": "377Kb",
"join_type": "BNL",
"attached_condition": "companies.company_id = products.company_id"
},
"table": {
"table_name": "prices",
"access_type": "ref",
"possible_keys": [
"usergroup",
"product_id",
"lower_limit",
"usergroup_id"
],
"key": "usergroup",
"key_length": "3",
"used_key_parts": ["product_id"],
"ref": ["noframes_angrybeaver.products_categories.product_id"],
"rows": 16,
"filtered": 99.23484039,
"attached_condition": "prices.lower_limit = 1 and prices.usergroup_id in (0,0,1)",
"using_index": true
}
}
}
}
}
Result
| product_id |
product |
company_name |
product_type |
parent_product_id |
| 10075 |
Подушка декоративная "Respect 04" 50х50 |
NoFrames |
P |
0 |
| 10135 |
Подушка декоративная "Respect 06" 30х50 |
NoFrames |
P |
0 |
| 9952 |
Подушка декоративная "Respect 11" 30х50 |
NoFrames |
P |
0 |
| 10074 |
Подушка декоративная "Respect 11" 50х50 |
NoFrames |
P |
0 |
| 10573 |
Подушка декоративная "Respect 12" 45x45 |
NoFrames |
P |
0 |
| 10577 |
Подушка декоративная "Respect 17" 30x50 |
NoFrames |
P |
0 |
| 10651 |
Подушка декоративная "Respect 20" 30х50 |
NoFrames |
P |
0 |
| 10642 |
Подушка декоративная "Respect 20" 50х50 |
NoFrames |
P |
0 |
| 12529 |
Подушка декоративная "Ribbon 02 Чёрный кант" 30х50 |
NoFrames |
P |
0 |
| 12515 |
Подушка декоративная "Ribbon 02 Чёрный кант" 50х50 |
NoFrames |
P |
0 |
| 12525 |
Подушка декоративная "Ribbon 03 Белый кант" 50х50 |
NoFrames |
P |
0 |
| 12532 |
Подушка декоративная "Ribbon 03 Чёрный кант" 30х50 |
NoFrames |
P |
0 |
| 12523 |
Подушка декоративная "Ribbon 03 Чёрный кант" 50х50 |
NoFrames |
P |
0 |
| 10198 |
Подушка декоративная "Salon 01" 30х50 |
NoFrames |
P |
0 |
| 10557 |
Подушка декоративная "Salon 01" 50x50 |
NoFrames |
P |
0 |
| 10202 |
Подушка декоративная "Salon 04" 30х50 |
NoFrames |
P |
0 |
| 10556 |
Подушка декоративная "Salon 04" 50x50 |
NoFrames |
P |
0 |
| 10101 |
Подушка декоративная "Salon 06" 30х50 |
NoFrames |
P |
0 |
| 10558 |
Подушка декоративная "Salon 06" 50x50 |
NoFrames |
P |
0 |
| 10142 |
Подушка декоративная "Simmetrika 03" 45x45 |
NoFrames |
P |
0 |