Query time 0.00226
JSON explain
{
"query_block": {
"select_id": 1,
"cost_info": {
"query_cost": "29.35"
},
"ordering_operation": {
"using_filesort": true,
"grouping_operation": {
"using_temporary_table": true,
"using_filesort": false,
"nested_loop": [
{
"table": {
"table_name": "shared_prices",
"access_type": "system",
"possible_keys": [
"usergroup",
"product_id",
"company_id",
"lower_limit",
"usergroup_id"
],
"rows_examined_per_scan": 0,
"rows_produced_per_join": 1,
"filtered": "0.00",
"const_row_not_found": true,
"cost_info": {
"read_cost": "0.00",
"eval_cost": "0.10",
"prefix_cost": "0.00",
"data_read_per_join": "32"
},
"used_columns": [
"product_id",
"price",
"percentage_discount",
"lower_limit",
"company_id",
"usergroup_id"
]
}
},
{
"table": {
"table_name": "cscart_categories",
"access_type": "const",
"possible_keys": [
"PRIMARY",
"c_status",
"p_category_id"
],
"key": "PRIMARY",
"used_key_parts": [
"category_id"
],
"key_length": "3",
"ref": [
"const"
],
"rows_examined_per_scan": 1,
"rows_produced_per_join": 1,
"filtered": "100.00",
"cost_info": {
"read_cost": "0.00",
"eval_cost": "0.10",
"prefix_cost": "0.00",
"data_read_per_join": "4K"
},
"used_columns": [
"category_id",
"usergroup_ids",
"status",
"storefront_id"
]
}
},
{
"table": {
"table_name": "companies",
"access_type": "ALL",
"possible_keys": [
"PRIMARY"
],
"rows_examined_per_scan": 2,
"rows_produced_per_join": 1,
"filtered": "50.00",
"cost_info": {
"read_cost": "0.62",
"eval_cost": "0.10",
"prefix_cost": "0.72",
"data_read_per_join": "5K"
},
"used_columns": [
"company_id",
"status",
"company"
],
"attached_condition": "(`primapearl_r_new`.`companies`.`status` = 'A')"
}
},
{
"table": {
"table_name": "products_categories",
"access_type": "ref",
"possible_keys": [
"PRIMARY",
"pt"
],
"key": "PRIMARY",
"used_key_parts": [
"category_id"
],
"key_length": "3",
"ref": [
"const"
],
"rows_examined_per_scan": 117,
"rows_produced_per_join": 117,
"filtered": "100.00",
"using_index": true,
"cost_info": {
"read_cost": "0.97",
"eval_cost": "11.70",
"prefix_cost": "13.39",
"data_read_per_join": "1K"
},
"used_columns": [
"product_id",
"category_id"
]
}
},
{
"table": {
"table_name": "products",
"access_type": "eq_ref",
"possible_keys": [
"PRIMARY",
"status",
"idx_parent_product_id"
],
"key": "PRIMARY",
"used_key_parts": [
"product_id"
],
"key_length": "3",
"ref": [
"primapearl_r_new.products_categories.product_id"
],
"rows_examined_per_scan": 1,
"rows_produced_per_join": 7,
"filtered": "6.62",
"cost_info": {
"read_cost": "0.00",
"eval_cost": "0.77",
"prefix_cost": "25.09",
"data_read_per_join": "65K"
},
"used_columns": [
"product_id",
"product_type",
"status",
"company_id",
"usergroup_ids",
"parent_product_id"
],
"attached_condition": "((`primapearl_r_new`.`products`.`company_id` = `primapearl_r_new`.`companies`.`company_id`) and (`primapearl_r_new`.`products`.`parent_product_id` = 0) and ((`primapearl_r_new`.`products`.`usergroup_ids` = '') or (0 <> find_in_set(0,`primapearl_r_new`.`products`.`usergroup_ids`)) or (0 <> find_in_set(1,`primapearl_r_new`.`products`.`usergroup_ids`))) and (`primapearl_r_new`.`products`.`status` = 'A'))"
}
},
{
"table": {
"table_name": "shared_descr",
"access_type": "eq_ref",
"possible_keys": [
"PRIMARY",
"product_id",
"company_id"
],
"key": "PRIMARY",
"used_key_parts": [
"product_id",
"lang_code",
"company_id"
],
"key_length": "13",
"ref": [
"primapearl_r_new.products_categories.product_id",
"const",
"const"
],
"rows_examined_per_scan": 1,
"rows_produced_per_join": 7,
"filtered": "100.00",
"cost_info": {
"read_cost": "0.00",
"eval_cost": "0.77",
"prefix_cost": "25.87",
"data_read_per_join": "29K"
},
"used_columns": [
"product_id",
"lang_code",
"company_id",
"product"
]
}
},
{
"table": {
"table_name": "descr1",
"access_type": "eq_ref",
"possible_keys": [
"PRIMARY",
"product_id"
],
"key": "PRIMARY",
"used_key_parts": [
"product_id",
"lang_code"
],
"key_length": "9",
"ref": [
"primapearl_r_new.products_categories.product_id",
"const"
],
"rows_examined_per_scan": 1,
"rows_produced_per_join": 7,
"filtered": "100.00",
"cost_info": {
"read_cost": "0.00",
"eval_cost": "0.77",
"prefix_cost": "26.64",
"data_read_per_join": "29K"
},
"used_columns": [
"product_id",
"lang_code",
"product"
]
}
},
{
"table": {
"table_name": "prices",
"access_type": "ref",
"possible_keys": [
"usergroup",
"product_id",
"lower_limit",
"usergroup_id"
],
"key": "product_id",
"used_key_parts": [
"product_id"
],
"key_length": "3",
"ref": [
"primapearl_r_new.products_categories.product_id"
],
"rows_examined_per_scan": 1,
"rows_produced_per_join": 3,
"filtered": "44.01",
"cost_info": {
"read_cost": "1.94",
"eval_cost": "0.34",
"prefix_cost": "29.35",
"data_read_per_join": "81"
},
"used_columns": [
"product_id",
"price",
"percentage_discount",
"lower_limit",
"usergroup_id"
],
"attached_condition": "((`primapearl_r_new`.`prices`.`lower_limit` = 1) and (`primapearl_r_new`.`prices`.`usergroup_id` in (0,0,1)))"
}
}
]
}
}
}
}
Result
| product_id |
product |
company_name |
price |
product_type |
parent_product_id |
| 8462 |
Подвеска из красного золота 585° пробы с жемчугом |
PRIMA |
13320.00000000 |
P |
0 |
| 8126 |
Подвеска из красного золота 585° пробы с жемчугом и фианитом |
PRIMA |
19050.00000000 |
P |
0 |
| 8522 |
Серьги из красного золота 585° пробы с жемчугом и фианитом |
PRIMA |
19160.00000000 |
P |
0 |
| 8162 |
Подвеска из красного золота 585° пробы с жемчугом и фианитом |
PRIMA |
19630.00000000 |
P |
0 |
| 8174 |
Подвеска из красного золота 585° пробы с жемчугом и фианитом |
PRIMA |
19750.00000000 |
P |
0 |
| 8423 |
Кольцо из красного золота 585° пробы с жемчугом и фианитом |
PRIMA |
20100.00000000 |
P |
0 |
| 8171 |
Подвеска из красного золота 585° пробы с жемчугом и фианитом |
PRIMA |
21500.00000000 |
P |
0 |
| 8173 |
Подвеска из красного золота 585° пробы с жемчугом и фианитом |
PRIMA |
21970.00000000 |
P |
0 |
| 8139 |
Подвеска из красного золота 585° пробы с жемчугом и фианитом |
PRIMA |
22670.00000000 |
P |
0 |
| 8180 |
Подвеска из красного золота 585° пробы с жемчугом и фианитом |
PRIMA |
22780.00000000 |
P |
0 |
| 8170 |
Подвеска из красного золота 585° пробы с жемчугом и фианитом |
PRIMA |
22900.00000000 |
P |
0 |
| 7507 |
Серьги из красного золота 585° пробы с жемчугом |
PRIMA |
24070.00000000 |
P |
0 |
| 8138 |
Подвеска из красного золота 585° пробы с жемчугом и фианитом |
PRIMA |
24890.00000000 |
P |
0 |
| 7510 |
Серьги из красного золота 585° пробы с жемчугом и фианитом |
PRIMA |
25000.00000000 |
P |
0 |
| 7074 |
Кольцо из красного золота 585° пробы с жемчугом и фианитом |
PRIMA |
25350.00000000 |
P |
0 |
| 8424 |
Кольцо из красного золота 585° пробы с жемчугом и фианитом |
PRIMA |
25710.00000000 |
P |
0 |
| 8158 |
Подвеска из красного золота 585° пробы с жемчугом и фианитом |
PRIMA |
26170.00000000 |
P |
0 |
| 7205 |
Кольцо из красного золота 585° пробы с жемчугом и фианитом |
PRIMA |
27110.00000000 |
P |
0 |
| 8072 |
Подвеска из красного золота 585° пробы с жемчугом и фианитом |
PRIMA |
28630.00000000 |
P |
0 |
| 7076 |
Кольцо из красного золота 585° пробы с жемчугом и фианитом |
PRIMA |
29330.00000000 |
P |
0 |
| 8128 |
Подвеска из красного золота 585° пробы с жемчугом и фианитом |
PRIMA |
29680.00000000 |
P |
0 |
| 7202 |
Кольцо из красного золота 585° пробы с жемчугом и фианитом |
PRIMA |
29910.00000000 |
P |
0 |
| 7163 |
Кольцо из красного золота 585° пробы с жемчугом и фианитом |
PRIMA |
30260.00000000 |
P |
0 |
| 8422 |
Кольцо из красного золота 585° пробы с жемчугом |
PRIMA |
30960.00000000 |
P |
0 |
| 7189 |
Кольцо из красного золота 585° пробы с жемчугом |
PRIMA |
31660.00000000 |
P |
0 |
| 7511 |
Серьги из красного золота 585° пробы с жемчугом и фианитом |
PRIMA |
31780.00000000 |
P |
0 |
| 7193 |
Кольцо из красного золота 585° пробы с жемчугом и фианитом |
PRIMA |
32010.00000000 |
P |
0 |