Query time 0.26266
JSON explain
{
"query_block": {
"select_id": 1,
"cost_info": {
"query_cost": "53.65"
},
"ordering_operation": {
"using_filesort": true,
"grouping_operation": {
"using_temporary_table": true,
"using_filesort": true,
"buffer_result": {
"using_temporary_table": true,
"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": "shared_prices_2",
"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",
"lower_limit",
"company_id",
"usergroup_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": "(`gaseus`.`companies`.`status` = 'A')"
}
},
{
"table": {
"table_name": "cscart_categories",
"access_type": "ALL",
"possible_keys": [
"PRIMARY",
"c_status",
"p_category_id"
],
"rows_examined_per_scan": 40,
"rows_produced_per_join": 1,
"filtered": "4.00",
"using_join_buffer": "hash join",
"cost_info": {
"read_cost": "4.56",
"eval_cost": "0.16",
"prefix_cost": "5.44",
"data_read_per_join": "6K"
},
"used_columns": [
"category_id",
"storefront_id",
"usergroup_ids",
"status"
],
"attached_condition": "(((`gaseus`.`cscart_categories`.`usergroup_ids` = '') or (0 <> find_in_set(0,`gaseus`.`cscart_categories`.`usergroup_ids`)) or (0 <> find_in_set(1,`gaseus`.`cscart_categories`.`usergroup_ids`))) and (`gaseus`.`cscart_categories`.`status` in ('A','H')) and (`gaseus`.`cscart_categories`.`storefront_id` in (0,1)))"
}
},
{
"table": {
"table_name": "products_categories",
"access_type": "ref",
"possible_keys": [
"PRIMARY",
"pt"
],
"key": "PRIMARY",
"used_key_parts": [
"category_id"
],
"key_length": "3",
"ref": [
"gaseus.cscart_categories.category_id"
],
"rows_examined_per_scan": 110,
"rows_produced_per_join": 176,
"filtered": "100.00",
"using_index": true,
"cost_info": {
"read_cost": "1.49",
"eval_cost": "17.60",
"prefix_cost": "24.53",
"data_read_per_join": "2K"
},
"used_columns": [
"product_id",
"category_id"
],
"attached_condition": "(`gaseus`.`products_categories`.`product_id` <> 3311)"
}
},
{
"table": {
"table_name": "products",
"access_type": "eq_ref",
"possible_keys": [
"PRIMARY",
"status"
],
"key": "PRIMARY",
"used_key_parts": [
"product_id"
],
"key_length": "3",
"ref": [
"gaseus.products_categories.product_id"
],
"rows_examined_per_scan": 1,
"rows_produced_per_join": 17,
"filtered": "10.00",
"cost_info": {
"read_cost": "0.00",
"eval_cost": "1.76",
"prefix_cost": "42.13",
"data_read_per_join": "114K"
},
"used_columns": [
"product_id",
"product_type",
"status",
"company_id",
"usergroup_ids",
"parent_product_id"
],
"attached_condition": "((`gaseus`.`products`.`company_id` = `gaseus`.`companies`.`company_id`) and ((`gaseus`.`products`.`usergroup_ids` = '') or (0 <> find_in_set(0,`gaseus`.`products`.`usergroup_ids`)) or (0 <> find_in_set(1,`gaseus`.`products`.`usergroup_ids`))) and (`gaseus`.`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": [
"gaseus.products_categories.product_id",
"const",
"const"
],
"rows_examined_per_scan": 1,
"rows_produced_per_join": 17,
"filtered": "100.00",
"cost_info": {
"read_cost": "0.00",
"eval_cost": "1.76",
"prefix_cost": "43.89",
"data_read_per_join": "67K"
},
"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": [
"gaseus.products_categories.product_id",
"const"
],
"rows_examined_per_scan": 1,
"rows_produced_per_join": 17,
"filtered": "100.00",
"cost_info": {
"read_cost": "0.00",
"eval_cost": "1.76",
"prefix_cost": "45.65",
"data_read_per_join": "80K"
},
"used_columns": [
"product_id",
"lang_code",
"product"
]
}
},
{
"table": {
"table_name": "prices",
"access_type": "ref",
"possible_keys": [
"usergroup",
"product_id",
"lower_limit",
"usergroup_id"
],
"key": "usergroup",
"used_key_parts": [
"product_id"
],
"key_length": "3",
"ref": [
"gaseus.products_categories.product_id"
],
"rows_examined_per_scan": 1,
"rows_produced_per_join": 5,
"filtered": "29.99",
"index_condition": "((`gaseus`.`prices`.`lower_limit` = 1) and (`gaseus`.`prices`.`usergroup_id` in (0,0,1)))",
"cost_info": {
"read_cost": "4.40",
"eval_cost": "0.53",
"prefix_cost": "51.81",
"data_read_per_join": "126"
},
"used_columns": [
"product_id",
"price",
"percentage_discount",
"lower_limit",
"usergroup_id"
],
"attached_condition": "(((`gaseus`.`prices`.`price` >= 207.10) or <cache>((NULL >= 207.10))) and ((`gaseus`.`prices`.`price` <= 228.90) or <cache>((NULL <= 228.90))))"
}
},
{
"table": {
"table_name": "prices_2",
"access_type": "ref",
"possible_keys": [
"usergroup",
"product_id",
"lower_limit",
"usergroup_id"
],
"key": "usergroup",
"used_key_parts": [
"product_id"
],
"key_length": "3",
"ref": [
"gaseus.products_categories.product_id"
],
"rows_examined_per_scan": 1,
"rows_produced_per_join": 0,
"filtered": "10.00",
"not_exists": true,
"cost_info": {
"read_cost": "1.32",
"eval_cost": "0.05",
"prefix_cost": "53.65",
"data_read_per_join": "12"
},
"used_columns": [
"product_id",
"price",
"lower_limit",
"usergroup_id"
],
"attached_condition": "(<if>(found_match(prices_2), (`gaseus`.`prices_2`.`price` is null), true) and <if>(is_not_null_compl(prices_2), ((`gaseus`.`prices_2`.`lower_limit` = 1) and (`gaseus`.`prices_2`.`price` < `gaseus`.`prices`.`price`) and (`gaseus`.`prices_2`.`usergroup_id` in (0,0,1))), true))"
}
}
]
}
}
}
}
}
Result
| product_id |
product |
company_name |
price |
product_ids |
product_types |
parent_product_ids |
product_type |
parent_product_id |
| 3424 |
Linde HP-Bundle hose DN6/PS300,ÜM W21,8RH90°-ÜM SV 12DKOS, 1.700 mm |
Gaseus |
215.06000000 |
3424 |
P |
0 |
P |
0 |
| 3422 |
Linde HP-Bundle hose 200 bar DN6/PS300, ÜM W24,32RH90°-ÜM SV 12DKOS, 1.700 mm |
Gaseus |
215.06000000 |
3422 |
P |
0 |
P |
0 |
| 3909 |
Linde HP-Bundle hose DN6/PS300, ÜM CEN O290°-ÜM SV 12DKOS, 1.000 mm |
Gaseus |
211.93000000 |
3909 |
P |
0 |
P |
0 |