Query time 0.00165
JSON explain
{
"query_block": {
"select_id": 1,
"cost_info": {
"query_cost": "11.64"
},
"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": 44,
"rows_produced_per_join": 44,
"filtered": "100.00",
"using_index": true,
"cost_info": {
"read_cost": "0.52",
"eval_cost": "4.40",
"prefix_cost": "5.64",
"data_read_per_join": "704"
},
"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": 2,
"filtered": "6.62",
"cost_info": {
"read_cost": "0.00",
"eval_cost": "0.29",
"prefix_cost": "10.04",
"data_read_per_join": "24K"
},
"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": 2,
"filtered": "100.00",
"cost_info": {
"read_cost": "0.00",
"eval_cost": "0.29",
"prefix_cost": "10.33",
"data_read_per_join": "11K"
},
"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": 2,
"filtered": "100.00",
"cost_info": {
"read_cost": "0.00",
"eval_cost": "0.29",
"prefix_cost": "10.62",
"data_read_per_join": "11K"
},
"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": 1,
"filtered": "44.01",
"cost_info": {
"read_cost": "0.73",
"eval_cost": "0.13",
"prefix_cost": "11.64",
"data_read_per_join": "30"
},
"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 |
| 8362 |
Подвеска из красного золота 585° пробы с жемчугом |
PRIMA |
21970.00000000 |
P |
0 |
| 8328 |
Подвеска из красного золота 585° пробы с жемчугом и фианитом |
PRIMA |
23140.00000000 |
P |
0 |
| 8363 |
Подвеска из красного золота 585° пробы с жемчугом и фианитом |
PRIMA |
23720.00000000 |
P |
0 |
| 7284 |
Кольцо из красного золота 585° пробы с жемчугом и фианитом |
PRIMA |
23840.00000000 |
P |
0 |
| 7393 |
Кольцо из красного золота 585° пробы с жемчугом |
PRIMA |
23950.00000000 |
P |
0 |
| 8327 |
Подвеска из красного золота 585° пробы с жемчугом и фианитом |
PRIMA |
24650.00000000 |
P |
0 |
| 8319 |
Подвеска из красного золота 585° пробы с жемчугом и фианитом |
PRIMA |
25590.00000000 |
P |
0 |
| 7262 |
Кольцо из красного золота 585° пробы с жемчугом и фианитом |
PRIMA |
25940.00000000 |
P |
0 |
| 7270 |
Кольцо из красного золота 585° пробы с жемчугом и фианитом |
PRIMA |
26520.00000000 |
P |
0 |
| 7363 |
Кольцо из красного золота 585° пробы с жемчугом и фианитом |
PRIMA |
26990.00000000 |
P |
0 |
| 7394 |
Кольцо из красного золота 585° пробы с жемчугом и фианитом |
PRIMA |
26990.00000000 |
P |
0 |
| 7362 |
Кольцо из красного золота 585° пробы с жемчугом и фианитом |
PRIMA |
29090.00000000 |
P |
0 |
| 7285 |
Кольцо из красного золота 585° пробы с жемчугом и фианитом |
PRIMA |
32250.00000000 |
P |
0 |
| 7318 |
Кольцо из красного золота 585° пробы с жемчугом |
PRIMA |
33880.00000000 |
P |
0 |
| 7354 |
Кольцо из красного золота 585° пробы с жемчугом и фианитом |
PRIMA |
36690.00000000 |
P |
0 |
| 8509 |
Серьги из красного золота 585° пробы с жемчугом |
PRIMA |
40190.00000000 |
P |
0 |
| 7801 |
Серьги из красного золота 585° пробы с жемчугом и фианитом |
PRIMA |
53510.00000000 |
P |
0 |
| 7849 |
Серьги из красного золота 585° пробы с жемчугом |
PRIMA |
53860.00000000 |
P |
0 |
| 7894 |
Серьги из красного золота 585° пробы с жемчугом и фианитом |
PRIMA |
57600.00000000 |
P |
0 |
| 7895 |
Серьги из красного золота 585° пробы с жемчугом и фианитом |
PRIMA |
57950.00000000 |
P |
0 |
| 7886 |
Серьги из красного золота 585° пробы с жемчугом и фианитом |
PRIMA |
58530.00000000 |
P |
0 |
| 7931 |
Серьги из красного золота 585° пробы с жемчугом |
PRIMA |
60990.00000000 |
P |
0 |
| 7932 |
Серьги из красного золота 585° пробы с жемчугом и фианитом |
PRIMA |
62390.00000000 |
P |
0 |
| 7793 |
Серьги из красного золота 585° пробы с жемчугом и фианитом |
PRIMA |
65310.00000000 |
P |
0 |
| 7815 |
Серьги из красного золота 585° пробы с жемчугом и фианитом |
PRIMA |
69860.00000000 |
P |
0 |
| 8511 |
Серьги из красного золота 585° пробы с жемчугом |
PRIMA |
72670.00000000 |
P |
0 |
| 8512 |
Серьги из красного золота 585° пробы с жемчугом |
PRIMA |
79790.00000000 |
P |
0 |