Query time 0.00783
JSON explain
{
"query_block": {
"select_id": 1,
"cost_info": {
"query_cost": "11.63"
},
"ordering_operation": {
"using_filesort": true,
"grouping_operation": {
"using_temporary_table": true,
"using_filesort": false,
"nested_loop": [
{
"table": {
"table_name": "companies",
"access_type": "ALL",
"possible_keys": [
"PRIMARY"
],
"rows_examined_per_scan": 1,
"rows_produced_per_join": 1,
"filtered": "100.00",
"cost_info": {
"read_cost": "0.25",
"eval_cost": "0.10",
"prefix_cost": "0.35",
"data_read_per_join": "5K"
},
"used_columns": [
"company_id",
"status",
"company"
],
"attached_condition": "(`aerokidsshop`.`companies`.`status` = 'A')"
}
},
{
"table": {
"table_name": "products",
"access_type": "ref",
"possible_keys": [
"PRIMARY",
"age_verification",
"status",
"idx_parent_product_id"
],
"key": "idx_parent_product_id",
"used_key_parts": [
"parent_product_id"
],
"key_length": "4",
"ref": [
"const"
],
"rows_examined_per_scan": 33,
"rows_produced_per_join": 3,
"filtered": "10.00",
"cost_info": {
"read_cost": "0.75",
"eval_cost": "0.33",
"prefix_cost": "4.40",
"data_read_per_join": "14K"
},
"used_columns": [
"product_id",
"product_type",
"status",
"company_id",
"list_price",
"usergroup_ids",
"parent_product_id"
],
"attached_condition": "((`aerokidsshop`.`products`.`company_id` = `aerokidsshop`.`companies`.`company_id`) and ((`aerokidsshop`.`products`.`usergroup_ids` = '') or (0 <> find_in_set(0,`aerokidsshop`.`products`.`usergroup_ids`)) or (0 <> find_in_set(1,`aerokidsshop`.`products`.`usergroup_ids`))) and (`aerokidsshop`.`products`.`status` = 'A'))"
}
},
{
"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": [
"aerokidsshop.products.product_id"
],
"rows_examined_per_scan": 1,
"rows_produced_per_join": 3,
"filtered": "100.00",
"cost_info": {
"read_cost": "0.83",
"eval_cost": "0.33",
"prefix_cost": "5.56",
"data_read_per_join": "79"
},
"used_columns": [
"product_id",
"price",
"percentage_discount",
"lower_limit",
"usergroup_id"
],
"attached_condition": "((`aerokidsshop`.`prices`.`lower_limit` = 1) and (`aerokidsshop`.`prices`.`usergroup_id` in (0,0,1)))"
}
},
{
"table": {
"table_name": "popularity",
"access_type": "eq_ref",
"possible_keys": [
"PRIMARY",
"total"
],
"key": "PRIMARY",
"used_key_parts": [
"product_id"
],
"key_length": "3",
"ref": [
"aerokidsshop.products.product_id"
],
"rows_examined_per_scan": 1,
"rows_produced_per_join": 3,
"filtered": "100.00",
"cost_info": {
"read_cost": "0.83",
"eval_cost": "0.33",
"prefix_cost": "6.71",
"data_read_per_join": "105"
},
"used_columns": [
"product_id",
"total"
]
}
},
{
"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": [
"aerokidsshop.products.product_id",
"const",
"const"
],
"rows_examined_per_scan": 1,
"rows_produced_per_join": 3,
"filtered": "100.00",
"cost_info": {
"read_cost": "0.83",
"eval_cost": "0.33",
"prefix_cost": "7.87",
"data_read_per_join": "12K"
},
"used_columns": [
"product_id",
"lang_code",
"company_id",
"product"
]
}
},
{
"table": {
"table_name": "shared_prices",
"access_type": "ref",
"possible_keys": [
"usergroup",
"product_id",
"company_id",
"lower_limit",
"usergroup_id"
],
"key": "usergroup",
"used_key_parts": [
"product_id"
],
"key_length": "3",
"ref": [
"aerokidsshop.products.product_id"
],
"rows_examined_per_scan": 1,
"rows_produced_per_join": 3,
"filtered": "100.00",
"cost_info": {
"read_cost": "0.83",
"eval_cost": "0.33",
"prefix_cost": "9.02",
"data_read_per_join": "105"
},
"used_columns": [
"product_id",
"price",
"percentage_discount",
"lower_limit",
"company_id",
"usergroup_id"
],
"attached_condition": "<if>(is_not_null_compl(shared_prices), ((`aerokidsshop`.`shared_prices`.`company_id` = 1) and (`aerokidsshop`.`shared_prices`.`lower_limit` = 1) and (`aerokidsshop`.`shared_prices`.`usergroup_id` in (0,0,1))), true)"
}
},
{
"table": {
"table_name": "shared_prices_2",
"access_type": "ref",
"possible_keys": [
"usergroup",
"product_id",
"company_id",
"lower_limit",
"usergroup_id"
],
"key": "usergroup",
"used_key_parts": [
"product_id"
],
"key_length": "3",
"ref": [
"aerokidsshop.shared_prices.product_id"
],
"rows_examined_per_scan": 1,
"rows_produced_per_join": 3,
"filtered": "100.00",
"not_exists": true,
"cost_info": {
"read_cost": "0.83",
"eval_cost": "0.33",
"prefix_cost": "10.18",
"data_read_per_join": "105"
},
"used_columns": [
"product_id",
"price",
"lower_limit",
"company_id",
"usergroup_id"
],
"attached_condition": "(<if>(found_match(shared_prices_2), (`aerokidsshop`.`shared_prices_2`.`price` is null), true) and <if>(is_not_null_compl(shared_prices_2), ((`aerokidsshop`.`shared_prices_2`.`lower_limit` = 1) and (`aerokidsshop`.`shared_prices_2`.`company_id` = 1) and (`aerokidsshop`.`shared_prices_2`.`price` < `aerokidsshop`.`shared_prices`.`price`) and (`aerokidsshop`.`shared_prices_2`.`usergroup_id` in (0,0,1))), true))"
}
},
{
"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": [
"aerokidsshop.products.product_id"
],
"rows_examined_per_scan": 1,
"rows_produced_per_join": 0,
"filtered": "10.00",
"not_exists": true,
"cost_info": {
"read_cost": "0.83",
"eval_cost": "0.03",
"prefix_cost": "11.33",
"data_read_per_join": "7"
},
"used_columns": [
"product_id",
"price",
"lower_limit",
"usergroup_id"
],
"attached_condition": "(<if>(found_match(prices_2), (`aerokidsshop`.`prices_2`.`price` is null), true) and <if>(is_not_null_compl(prices_2), ((`aerokidsshop`.`prices_2`.`lower_limit` = 1) and (`aerokidsshop`.`prices_2`.`price` < `aerokidsshop`.`prices`.`price`) and (`aerokidsshop`.`prices_2`.`usergroup_id` in (0,0,1))), true))"
}
},
{
"table": {
"table_name": "products_categories",
"access_type": "ref",
"possible_keys": [
"PRIMARY",
"pt"
],
"key": "pt",
"used_key_parts": [
"product_id"
],
"key_length": "3",
"ref": [
"aerokidsshop.products.product_id"
],
"rows_examined_per_scan": 1,
"rows_produced_per_join": 0,
"filtered": "100.00",
"using_index": true,
"cost_info": {
"read_cost": "0.08",
"eval_cost": "0.04",
"prefix_cost": "11.45",
"data_read_per_join": "5"
},
"used_columns": [
"product_id",
"category_id"
]
}
},
{
"table": {
"table_name": "cscart_categories",
"access_type": "eq_ref",
"possible_keys": [
"PRIMARY",
"c_status",
"p_category_id"
],
"key": "PRIMARY",
"used_key_parts": [
"category_id"
],
"key_length": "3",
"ref": [
"aerokidsshop.products_categories.category_id"
],
"rows_examined_per_scan": 1,
"rows_produced_per_join": 0,
"filtered": "5.00",
"cost_info": {
"read_cost": "0.09",
"eval_cost": "0.00",
"prefix_cost": "11.58",
"data_read_per_join": "49"
},
"used_columns": [
"category_id",
"company_id",
"storefront_id",
"usergroup_ids",
"status"
],
"attached_condition": "(((`aerokidsshop`.`cscart_categories`.`usergroup_ids` = '') or (0 <> find_in_set(0,`aerokidsshop`.`cscart_categories`.`usergroup_ids`)) or (0 <> find_in_set(1,`aerokidsshop`.`cscart_categories`.`usergroup_ids`))) and (`aerokidsshop`.`cscart_categories`.`status` in ('A','H')) and (`aerokidsshop`.`cscart_categories`.`storefront_id` in (0,1)))"
}
},
{
"table": {
"table_name": "cscart_product_sales",
"access_type": "eq_ref",
"possible_keys": [
"PRIMARY",
"pa"
],
"key": "PRIMARY",
"used_key_parts": [
"category_id",
"product_id"
],
"key_length": "6",
"ref": [
"aerokidsshop.products_categories.category_id",
"aerokidsshop.products.product_id"
],
"rows_examined_per_scan": 1,
"rows_produced_per_join": 0,
"filtered": "100.00",
"using_index": true,
"cost_info": {
"read_cost": "0.00",
"eval_cost": "0.00",
"prefix_cost": "11.59",
"data_read_per_join": "0"
},
"used_columns": [
"category_id",
"product_id"
]
}
},
{
"table": {
"table_name": "cscart_product_features_values",
"access_type": "ref",
"possible_keys": [
"lang_code",
"product_id",
"idx_product_feature_variant_id"
],
"key": "product_id",
"used_key_parts": [
"product_id"
],
"key_length": "3",
"ref": [
"aerokidsshop.products.product_id"
],
"rows_examined_per_scan": 3,
"rows_produced_per_join": 0,
"filtered": "100.00",
"using_index": true,
"cost_info": {
"read_cost": "0.00",
"eval_cost": "0.01",
"prefix_cost": "11.60",
"data_read_per_join": "58"
},
"used_columns": [
"feature_id",
"product_id",
"variant_id",
"lang_code"
],
"attached_condition": "<if>(is_not_null_compl(cscart_product_features_values), (`aerokidsshop`.`cscart_product_features_values`.`lang_code` = 'en'), true)"
}
},
{
"table": {
"table_name": "cscart_product_features",
"access_type": "eq_ref",
"possible_keys": [
"PRIMARY"
],
"key": "PRIMARY",
"used_key_parts": [
"feature_id"
],
"key_length": "3",
"ref": [
"aerokidsshop.cscart_product_features_values.feature_id"
],
"rows_examined_per_scan": 1,
"rows_produced_per_join": 0,
"filtered": "100.00",
"using_index": true,
"cost_info": {
"read_cost": "0.02",
"eval_cost": "0.01",
"prefix_cost": "11.62",
"data_read_per_join": "32"
},
"used_columns": [
"feature_id"
]
}
},
{
"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": [
"aerokidsshop.products.product_id",
"const"
],
"rows_examined_per_scan": 1,
"rows_produced_per_join": 0,
"filtered": "100.00",
"cost_info": {
"read_cost": "0.00",
"eval_cost": "0.01",
"prefix_cost": "11.63",
"data_read_per_join": "342"
},
"used_columns": [
"product_id",
"lang_code",
"product"
]
}
}
]
}
}
}
}