Query time 0.01318
JSON explain
{
"query_block": {
"select_id": 1,
"cost_info": {
"query_cost": "94.54"
},
"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": 9,
"rows_produced_per_join": 1,
"filtered": "11.11",
"cost_info": {
"read_cost": "1.05",
"eval_cost": "0.10",
"prefix_cost": "1.15",
"data_read_per_join": "6K"
},
"used_columns": [
"company_id",
"status",
"company"
],
"attached_condition": "(`aomnia_com`.`companies`.`status` = 'A')"
}
},
{
"table": {
"table_name": "products",
"access_type": "ref",
"possible_keys": [
"PRIMARY",
"age_verification",
"status",
"idx_parent_product_id"
],
"key": "status",
"used_key_parts": [
"status"
],
"key_length": "3",
"ref": [
"const"
],
"rows_examined_per_scan": 620,
"rows_produced_per_join": 16,
"filtered": "2.72",
"cost_info": {
"read_cost": "11.25",
"eval_cost": "1.69",
"prefix_cost": "74.40",
"data_read_per_join": "74K"
},
"used_columns": [
"product_id",
"product_type",
"status",
"company_id",
"list_price",
"amount",
"usergroup_ids",
"tracking",
"parent_product_id"
],
"attached_condition": "((`aomnia_com`.`products`.`company_id` = `aomnia_com`.`companies`.`company_id`) and (`aomnia_com`.`products`.`parent_product_id` = 0) and ((`aomnia_com`.`products`.`amount` > 0) or (`aomnia_com`.`products`.`tracking` = 'D')) and ((`aomnia_com`.`products`.`usergroup_ids` = '') or (0 <> find_in_set(0,`aomnia_com`.`products`.`usergroup_ids`)) or (0 <> find_in_set(1,`aomnia_com`.`products`.`usergroup_ids`))) and (`aomnia_com`.`products`.`product_type` <> 'T') and (`aomnia_com`.`products`.`product_type` <> 'D'))"
}
},
{
"table": {
"table_name": "popularity",
"access_type": "eq_ref",
"possible_keys": [
"PRIMARY",
"total"
],
"key": "PRIMARY",
"used_key_parts": [
"product_id"
],
"key_length": "3",
"ref": [
"aomnia_com.products.product_id"
],
"rows_examined_per_scan": 1,
"rows_produced_per_join": 16,
"filtered": "100.00",
"cost_info": {
"read_cost": "4.22",
"eval_cost": "1.69",
"prefix_cost": "80.31",
"data_read_per_join": "540"
},
"used_columns": [
"product_id",
"total"
]
}
},
{
"table": {
"table_name": "products_categories",
"access_type": "ref",
"possible_keys": [
"PRIMARY",
"pt"
],
"key": "pt",
"used_key_parts": [
"product_id"
],
"key_length": "3",
"ref": [
"aomnia_com.products.product_id"
],
"rows_examined_per_scan": 1,
"rows_produced_per_join": 17,
"filtered": "100.00",
"using_index": true,
"cost_info": {
"read_cost": "4.22",
"eval_cost": "1.74",
"prefix_cost": "86.27",
"data_read_per_join": "279"
},
"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": [
"aomnia_com.products_categories.category_id"
],
"rows_examined_per_scan": 1,
"rows_produced_per_join": 0,
"filtered": "5.00",
"cost_info": {
"read_cost": "4.36",
"eval_cost": "0.09",
"prefix_cost": "92.38",
"data_read_per_join": "2K"
},
"used_columns": [
"category_id",
"storefront_id",
"usergroup_ids",
"status"
],
"attached_condition": "(((`aomnia_com`.`cscart_categories`.`usergroup_ids` = '') or (0 <> find_in_set(0,`aomnia_com`.`cscart_categories`.`usergroup_ids`)) or (0 <> find_in_set(1,`aomnia_com`.`cscart_categories`.`usergroup_ids`))) and (`aomnia_com`.`cscart_categories`.`status` in ('A','H')) and (`aomnia_com`.`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": [
"aomnia_com.products_categories.category_id",
"aomnia_com.products.product_id"
],
"rows_examined_per_scan": 1,
"rows_produced_per_join": 0,
"filtered": "100.00",
"using_index": true,
"cost_info": {
"read_cost": "0.22",
"eval_cost": "0.09",
"prefix_cost": "92.68",
"data_read_per_join": "13"
},
"used_columns": [
"category_id",
"product_id"
]
}
},
{
"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": [
"aomnia_com.products.product_id"
],
"rows_examined_per_scan": 1,
"rows_produced_per_join": 0,
"filtered": "99.34",
"cost_info": {
"read_cost": "0.22",
"eval_cost": "0.09",
"prefix_cost": "92.99",
"data_read_per_join": "20"
},
"used_columns": [
"product_id",
"price",
"percentage_discount",
"lower_limit",
"usergroup_id"
],
"attached_condition": "((`aomnia_com`.`prices`.`lower_limit` = 1) and (`aomnia_com`.`prices`.`usergroup_id` in (0,0,1)))"
}
},
{
"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": [
"aomnia_com.products.product_id"
],
"rows_examined_per_scan": 1,
"rows_produced_per_join": 0,
"filtered": "9.93",
"not_exists": true,
"cost_info": {
"read_cost": "0.22",
"eval_cost": "0.01",
"prefix_cost": "93.30",
"data_read_per_join": "2"
},
"used_columns": [
"product_id",
"price",
"lower_limit",
"usergroup_id"
],
"attached_condition": "(<if>(found_match(prices_2), (`aomnia_com`.`prices_2`.`price` is null), true) and <if>(is_not_null_compl(prices_2), ((`aomnia_com`.`prices_2`.`lower_limit` = 1) and (`aomnia_com`.`prices_2`.`price` < `aomnia_com`.`prices`.`price`) and (`aomnia_com`.`prices_2`.`usergroup_id` in (0,0,1))), true))"
}
},
{
"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": [
"aomnia_com.products.product_id"
],
"rows_examined_per_scan": 25,
"rows_produced_per_join": 2,
"filtered": "100.00",
"using_index": true,
"cost_info": {
"read_cost": "0.03",
"eval_cost": "0.22",
"prefix_cost": "93.54",
"data_read_per_join": "1K"
},
"used_columns": [
"feature_id",
"product_id",
"variant_id",
"lang_code"
],
"attached_condition": "<if>(is_not_null_compl(cscart_product_features_values), (`aomnia_com`.`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": [
"aomnia_com.cscart_product_features_values.feature_id"
],
"rows_examined_per_scan": 1,
"rows_produced_per_join": 2,
"filtered": "100.00",
"using_index": true,
"cost_info": {
"read_cost": "0.53",
"eval_cost": "0.22",
"prefix_cost": "94.30",
"data_read_per_join": "973"
},
"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": [
"aomnia_com.products.product_id",
"const"
],
"rows_examined_per_scan": 1,
"rows_produced_per_join": 2,
"filtered": "100.00",
"cost_info": {
"read_cost": "0.02",
"eval_cost": "0.22",
"prefix_cost": "94.54",
"data_read_per_join": "10K"
},
"used_columns": [
"product_id",
"lang_code",
"product"
]
}
}
]
}
}
}
}