Query time 0.00120
JSON explain
{
"query_block": {
"select_id": 1,
"cost_info": {
"query_cost": "21.28"
},
"nested_loop": [
{
"table": {
"table_name": "master_products_storefront_offers_count",
"access_type": "system",
"possible_keys": [
"PRIMARY",
"idx_storefront_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": "16"
},
"used_columns": [
"storefront_id",
"product_id",
"count"
]
}
},
{
"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": "2K"
},
"used_columns": [
"category_id",
"usergroup_ids",
"status",
"storefront_id"
]
}
},
{
"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": 84,
"rows_produced_per_join": 84,
"filtered": "100.00",
"using_index": true,
"cost_info": {
"read_cost": "0.28",
"eval_cost": "8.40",
"prefix_cost": "8.68",
"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",
"idx_master_product_id"
],
"key": "PRIMARY",
"used_key_parts": [
"product_id"
],
"key_length": "3",
"ref": [
"cscart_db.products_categories.product_id"
],
"rows_examined_per_scan": 1,
"rows_produced_per_join": 4,
"filtered": "5.00",
"cost_info": {
"read_cost": "0.00",
"eval_cost": "0.42",
"prefix_cost": "17.08",
"data_read_per_join": "21K"
},
"used_columns": [
"product_id",
"status",
"company_id",
"usergroup_ids",
"parent_product_id",
"master_product_id",
"master_product_status"
],
"attached_condition": "((`cscart_db`.`products`.`master_product_id` = 0) and (`cscart_db`.`products`.`parent_product_id` = 0) and (`cscart_db`.`products`.`company_id` in (13,0)) and ((`cscart_db`.`products`.`usergroup_ids` = '') or (0 <> find_in_set(0,`cscart_db`.`products`.`usergroup_ids`)) or (0 <> find_in_set(1,`cscart_db`.`products`.`usergroup_ids`))) and (`cscart_db`.`products`.`status` = 'A') and (`cscart_db`.`products`.`master_product_status` = 'A') and ((`cscart_db`.`products`.`company_id` > 0) or <cache>((NULL > 0))))"
}
},
{
"table": {
"table_name": "companies",
"access_type": "eq_ref",
"possible_keys": [
"PRIMARY"
],
"key": "PRIMARY",
"used_key_parts": [
"company_id"
],
"key_length": "4",
"ref": [
"cscart_db.products.company_id"
],
"rows_examined_per_scan": 1,
"rows_produced_per_join": 4,
"filtered": "100.00",
"cost_info": {
"read_cost": "0.00",
"eval_cost": "0.42",
"prefix_cost": "17.50",
"data_read_per_join": "29K"
},
"used_columns": [
"company_id",
"status"
],
"attached_condition": "<if>(found_match(companies), ((`cscart_db`.`companies`.`status` = 'A') or (`cscart_db`.`products`.`company_id` = 0)), true)"
}
},
{
"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": [
"cscart_db.products_categories.product_id",
"const"
],
"rows_examined_per_scan": 1,
"rows_produced_per_join": 4,
"filtered": "100.00",
"using_index": true,
"cost_info": {
"read_cost": "0.00",
"eval_cost": "0.42",
"prefix_cost": "17.92",
"data_read_per_join": "19K"
},
"used_columns": [
"product_id",
"lang_code"
]
}
},
{
"table": {
"table_name": "cscart_supplier_links",
"access_type": "ref",
"possible_keys": [
"object_id"
],
"key": "object_id",
"used_key_parts": [
"object_id",
"object_type"
],
"key_length": "7",
"ref": [
"cscart_db.products_categories.product_id",
"const"
],
"rows_examined_per_scan": 1,
"rows_produced_per_join": 4,
"filtered": "100.00",
"using_index": true,
"cost_info": {
"read_cost": "1.05",
"eval_cost": "0.42",
"prefix_cost": "19.39",
"data_read_per_join": "67"
},
"used_columns": [
"object_id",
"object_type"
],
"attached_condition": "<if>(is_not_null_compl(cscart_supplier_links), (`cscart_db`.`cscart_supplier_links`.`object_id` = `cscart_db`.`products_categories`.`product_id`), true)"
}
},
{
"table": {
"table_name": "prices",
"access_type": "ref",
"possible_keys": [
"usergroup",
"product_id",
"lower_limit",
"usergroup_id",
"idx_product_prices_usergroup_limit"
],
"key": "product_id",
"used_key_parts": [
"product_id"
],
"key_length": "3",
"ref": [
"cscart_db.products_categories.product_id"
],
"rows_examined_per_scan": 1,
"rows_produced_per_join": 4,
"filtered": "99.94",
"cost_info": {
"read_cost": "1.05",
"eval_cost": "0.42",
"prefix_cost": "20.86",
"data_read_per_join": "100"
},
"used_columns": [
"product_id",
"lower_limit",
"usergroup_id"
],
"attached_condition": "((`cscart_db`.`prices`.`lower_limit` = 1) and (`cscart_db`.`prices`.`usergroup_id` in (0,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": [
"const",
"cscart_db.products_categories.product_id"
],
"rows_examined_per_scan": 1,
"rows_produced_per_join": 4,
"filtered": "100.00",
"using_index": true,
"cost_info": {
"read_cost": "0.00",
"eval_cost": "0.42",
"prefix_cost": "21.28",
"data_read_per_join": "67"
},
"used_columns": [
"category_id",
"product_id"
]
}
}
]
}
}