Query time 0.02078
JSON explain
{
"query_block": {
"select_id": 1,
"cost_info": {
"query_cost": "688.31"
},
"ordering_operation": {
"using_filesort": true,
"grouping_operation": {
"using_temporary_table": true,
"using_filesort": false,
"nested_loop": [
{
"table": {
"table_name": "cscart_categories",
"access_type": "const",
"possible_keys": [
"PRIMARY",
"p_category_id",
"idx_categories_storefront_status",
"idx_categories_usergroup_status",
"idx_categories_status_id_path"
],
"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",
"status",
"storefront_id"
]
}
},
{
"table": {
"table_name": "products_categories",
"access_type": "range",
"possible_keys": [
"PRIMARY",
"pt",
"idx_product_category_lookup",
"idx_products_categories_composite"
],
"key": "PRIMARY",
"used_key_parts": [
"category_id",
"product_id"
],
"key_length": "6",
"rows_examined_per_scan": 1047,
"rows_produced_per_join": 1047,
"filtered": "100.00",
"using_index": true,
"cost_info": {
"read_cost": "107.71",
"eval_cost": "104.70",
"prefix_cost": "212.41",
"data_read_per_join": "16K"
},
"used_columns": [
"product_id",
"category_id"
],
"attached_condition": "((`cscart_db`.`products_categories`.`category_id` = 2828) and (`cscart_db`.`products_categories`.`product_id` <> 66725))"
}
},
{
"table": {
"table_name": "products",
"access_type": "eq_ref",
"possible_keys": [
"PRIMARY",
"age_verification",
"status",
"idx_parent_product_id",
"idx_master_product_id",
"youtube_link",
"idx_products_parent_lookup",
"idx_products_status_company",
"idx_products_master_status",
"idx_products_inventory",
"idx_products_status_company_master",
"idx_products_main_query",
"idx_products_query_opt",
"idx_products_composite_query",
"idx_kl_qc_enabled"
],
"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": 52,
"filtered": "5.00",
"cost_info": {
"read_cost": "292.13",
"eval_cost": "5.24",
"prefix_cost": "609.24",
"data_read_per_join": "273K"
},
"used_columns": [
"product_id",
"product_type",
"status",
"company_id",
"list_price",
"amount",
"tracking",
"parent_product_id",
"master_product_id",
"master_product_status",
"master_product_offers_count"
],
"attached_condition": "((`cscart_db`.`products`.`master_product_id` = 0) and (`cscart_db`.`products`.`parent_product_id` = 0) and (`cscart_db`.`products`.`status` = 'A') and (`cscart_db`.`products`.`master_product_status` = 'A') and ((`cscart_db`.`products`.`amount` > 0) or (`cscart_db`.`products`.`tracking` = 'D')))"
}
},
{
"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": 52,
"filtered": "100.00",
"cost_info": {
"read_cost": "13.09",
"eval_cost": "5.24",
"prefix_cost": "627.56",
"data_read_per_join": "364K"
},
"used_columns": [
"company_id",
"status",
"company"
],
"attached_condition": "<if>(found_match(companies), ((`cscart_db`.`companies`.`status` = 'A') or (`cscart_db`.`products`.`company_id` = 0)), true)"
}
},
{
"table": {
"table_name": "prices",
"access_type": "ref",
"possible_keys": [
"usergroup",
"product_id",
"lower_limit",
"usergroup_id",
"idx_product_prices_usergroup_limit",
"idx_prices_discount_lookup",
"idx_prices_min_calc",
"idx_prices_usergroup_lookup",
"idx_prices_usergroup_product"
],
"key": "idx_prices_discount_lookup",
"used_key_parts": [
"product_id",
"lower_limit"
],
"key_length": "6",
"ref": [
"cscart_db.products_categories.product_id",
"const"
],
"rows_examined_per_scan": 1,
"rows_produced_per_join": 10,
"filtered": "20.00",
"using_index": true,
"cost_info": {
"read_cost": "13.09",
"eval_cost": "1.05",
"prefix_cost": "645.88",
"data_read_per_join": "251"
},
"used_columns": [
"product_id",
"price",
"lower_limit",
"usergroup_id"
],
"attached_condition": "(`cscart_db`.`prices`.`usergroup_id` in (0,1))"
}
},
{
"table": {
"table_name": "cscart_supplier_links",
"access_type": "ref",
"possible_keys": [
"object_id",
"idx_supplier_product_lookup",
"idx_supplier_products"
],
"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": 10,
"filtered": "100.00",
"using_index": true,
"cost_info": {
"read_cost": "5.04",
"eval_cost": "1.05",
"prefix_cost": "651.98",
"data_read_per_join": "167"
},
"used_columns": [
"supplier_id",
"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": "master_products_storefront_offers_count",
"access_type": "eq_ref",
"possible_keys": [
"PRIMARY",
"idx_storefront_id",
"idx_storefront_product_count"
],
"key": "PRIMARY",
"used_key_parts": [
"product_id",
"storefront_id"
],
"key_length": "8",
"ref": [
"cscart_db.products_categories.product_id",
"const"
],
"rows_examined_per_scan": 1,
"rows_produced_per_join": 10,
"filtered": "100.00",
"cost_info": {
"read_cost": "2.62",
"eval_cost": "1.05",
"prefix_cost": "655.64",
"data_read_per_join": "167"
},
"used_columns": [
"storefront_id",
"product_id",
"count"
],
"attached_condition": "(<if>(found_match(master_products_storefront_offers_count), ((`cscart_db`.`products`.`company_id` > 0) or (`cscart_db`.`master_products_storefront_offers_count`.`count` > 0)), true) and <if>(is_not_null_compl(master_products_storefront_offers_count), (`cscart_db`.`master_products_storefront_offers_count`.`product_id` = `cscart_db`.`products_categories`.`product_id`), true))"
}
},
{
"table": {
"table_name": "cscart_product_sales",
"access_type": "ref",
"possible_keys": [
"idx_product_sales_category_amount"
],
"key": "idx_product_sales_category_amount",
"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": 10,
"filtered": "100.00",
"using_index": true,
"cost_info": {
"read_cost": "2.62",
"eval_cost": "1.05",
"prefix_cost": "659.30",
"data_read_per_join": "167"
},
"used_columns": [
"category_id",
"product_id",
"amount"
]
}
},
{
"table": {
"table_name": "descr1",
"access_type": "eq_ref",
"possible_keys": [
"PRIMARY",
"product_id",
"idx_product_desc_lang",
"idx_product_name_search",
"idx_product_desc_sort"
],
"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": 10,
"filtered": "100.00",
"cost_info": {
"read_cost": "7.15",
"eval_cost": "1.05",
"prefix_cost": "667.50",
"data_read_per_join": "47K"
},
"used_columns": [
"product_id",
"lang_code",
"product"
]
}
},
{
"table": {
"table_name": "pfv",
"access_type": "ref",
"possible_keys": [
"PRIMARY",
"product_id",
"fpl",
"idx_product_feature_variant_id",
"fl"
],
"key": "idx_product_feature_variant_id",
"used_key_parts": [
"product_id",
"feature_id"
],
"key_length": "6",
"ref": [
"cscart_db.products_categories.product_id",
"const"
],
"rows_examined_per_scan": 1,
"rows_produced_per_join": 12,
"filtered": "100.00",
"using_index": true,
"cost_info": {
"read_cost": "6.21",
"eval_cost": "1.26",
"prefix_cost": "674.98",
"data_read_per_join": "503"
},
"used_columns": [
"feature_id",
"product_id",
"variant_id",
"lang_code"
]
}
},
{
"table": {
"table_name": "pvd",
"access_type": "eq_ref",
"possible_keys": [
"PRIMARY"
],
"key": "PRIMARY",
"used_key_parts": [
"variant_id",
"lang_code"
],
"key_length": "9",
"ref": [
"cscart_db.pfv.variant_id",
"const"
],
"rows_examined_per_scan": 1,
"rows_produced_per_join": 12,
"filtered": "100.00",
"cost_info": {
"read_cost": "4.75",
"eval_cost": "1.26",
"prefix_cost": "680.98",
"data_read_per_join": "94K"
},
"used_columns": [
"variant_id",
"variant",
"lang_code"
]
}
},
{
"table": {
"table_name": "prpd",
"access_type": "ref",
"possible_keys": [
"PRIMARY"
],
"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": 25,
"filtered": "100.00",
"cost_info": {
"read_cost": "4.81",
"eval_cost": "2.52",
"prefix_cost": "688.31",
"data_read_per_join": "402"
},
"used_columns": [
"product_id",
"storefront_id",
"average_rating",
"reviews_count"
]
}
}
]
}
}
}
}
Result
| product_id |
list_price |
price |
amount |
product |
company_name |
supplier_id |
product_type |
parent_product_id |
master_product_offers_count |
master_product_id |
company_id |
average_rating |
reviews_count |
brand_name |
| 37518 |
2050.00 |
1333.00 |
3426 |
The 6 Peptide Skin Booster Face Serum | 150ml |
Roadskye Tradecom Pvt. Ltd. |
698 |
P |
0 |
0 |
0 |
13 |
4.77 |
152 |
COSRX |
| 3562 |
1570.00 |
1099.00 |
36 |
Vitamin C | Brightening Boost | Serum | 35ml |
Roadskye Tradecom Pvt. Ltd. |
698 |
P |
0 |
0 |
0 |
13 |
4.78 |
60 |
Klairs |
| 32163 |
700.00 |
455.00 |
208 |
The Mini Glow Set |
Roadskye Tradecom Pvt. Ltd. |
698 |
P |
0 |
0 |
0 |
13 |
4.57 |
21 |
AXIS-Y |
| 67972 |
450.00 |
360.00 |
18 |
Vita Dark Spot Serum 5ml |
Roadskye Tradecom Pvt. Ltd. |
698 |
P |
0 |
0 |
0 |
13 |
4.71 |
17 |
Rovectin |
| 28568 |
1850.00 |
1203.00 |
2227 |
The Niacinamide 15 Serum Face Serum | 20ml |
Roadskye Tradecom Pvt. Ltd. |
698 |
P |
0 |
0 |
0 |
13 |
4.71 |
7 |
COSRX |
| 33697 |
999.00 |
749.25 |
76 |
Madagascar Centella Ampoule 30ml |
Roadskye Tradecom Pvt. Ltd. |
698 |
P |
0 |
0 |
0 |
13 |
4.43 |
14 |
SKIN1004 |
| 33698 |
2299.00 |
1724.25 |
22 |
Madagascar Centella Ampoule 100ml |
Roadskye Tradecom Pvt. Ltd. |
698 |
P |
0 |
0 |
0 |
13 |
4.71 |
7 |
SKIN1004 |
| 68615 |
599.00 |
599.00 |
1038 |
CICA Calming Sun Serum Deluxe SPF50+ PA++++ 10ml |
Roadskye Tradecom Pvt. Ltd. |
698 |
P |
0 |
0 |
0 |
13 |
4.75 |
12 |
Tocobo |