Query time 0.00164
JSON explain
{
"query_block": {
"select_id": 1,
"cost_info": {
"query_cost": "5.89"
},
"ordering_operation": {
"using_temporary_table": true,
"using_filesort": true,
"grouping_operation": {
"using_filesort": false,
"nested_loop": [
{
"table": {
"table_name": "products",
"access_type": "range",
"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",
"rows_examined_per_scan": 10,
"rows_produced_per_join": 0,
"filtered": "2.00",
"cost_info": {
"read_cost": "5.31",
"eval_cost": "0.02",
"prefix_cost": "5.33",
"data_read_per_join": "1K"
},
"used_columns": [
"product_id",
"kl_erp_inventory_id",
"product_type",
"status",
"company_id",
"amount",
"kl_enable_qc",
"kl_qc_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`.`company_id` in (13,0)) and ((`cscart_db`.`products`.`amount` > 0) or (`cscart_db`.`products`.`tracking` = 'D')) and (`cscart_db`.`products`.`product_id` in (39124,66758,65547,39922,69901,69043,39638,67036,65175,65171)) and (`cscart_db`.`products`.`status` = 'A') and (`cscart_db`.`products`.`master_product_status` = 'A') and (`cscart_db`.`products`.`company_id` > 0))"
}
},
{
"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.product_id",
"const"
],
"rows_examined_per_scan": 1,
"rows_produced_per_join": 0,
"filtered": "100.00",
"cost_info": {
"read_cost": "0.14",
"eval_cost": "0.02",
"prefix_cost": "5.49",
"data_read_per_join": "935"
},
"used_columns": [
"product_id",
"lang_code",
"product"
]
}
},
{
"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.product_id",
"const"
],
"rows_examined_per_scan": 1,
"rows_produced_per_join": 0,
"filtered": "100.00",
"using_index": true,
"cost_info": {
"read_cost": "0.06",
"eval_cost": "0.02",
"prefix_cost": "5.57",
"data_read_per_join": "4"
},
"used_columns": [
"product_id",
"lower_limit",
"usergroup_id"
],
"attached_condition": "<if>(is_not_null_compl(prices), (`cscart_db`.`prices`.`usergroup_id` in (0,1)), true)"
}
},
{
"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": 0,
"filtered": "100.00",
"cost_info": {
"read_cost": "0.05",
"eval_cost": "0.02",
"prefix_cost": "5.64",
"data_read_per_join": "1K"
},
"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": "products_categories",
"access_type": "ref",
"possible_keys": [
"idx_products_categories_composite"
],
"key": "idx_products_categories_composite",
"used_key_parts": [
"product_id"
],
"key_length": "3",
"ref": [
"cscart_db.products.product_id"
],
"rows_examined_per_scan": 1,
"rows_produced_per_join": 0,
"filtered": "100.00",
"using_index": true,
"cost_info": {
"read_cost": "0.09",
"eval_cost": "0.02",
"prefix_cost": "5.74",
"data_read_per_join": "3"
},
"used_columns": [
"product_id",
"category_id"
]
}
},
{
"table": {
"table_name": "cscart_categories",
"access_type": "eq_ref",
"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": [
"cscart_db.products_categories.category_id"
],
"rows_examined_per_scan": 1,
"rows_produced_per_join": 0,
"filtered": "81.96",
"cost_info": {
"read_cost": "0.06",
"eval_cost": "0.02",
"prefix_cost": "5.83",
"data_read_per_join": "542"
},
"used_columns": [
"category_id",
"status",
"storefront_id"
],
"attached_condition": "((`cscart_db`.`cscart_categories`.`status` in ('A','H')) and (`cscart_db`.`cscart_categories`.`storefront_id` in (0,1)))"
}
},
{
"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": [
"cscart_db.products_categories.category_id",
"cscart_db.products.product_id"
],
"rows_examined_per_scan": 1,
"rows_produced_per_join": 0,
"filtered": "100.00",
"using_index": true,
"cost_info": {
"read_cost": "0.05",
"eval_cost": "0.02",
"prefix_cost": "5.89",
"data_read_per_join": "3"
},
"used_columns": [
"category_id",
"product_id",
"amount"
]
}
}
]
}
}
}
}
Result
| product_id |
product |
company_name |
kl_erp_inventory_id |
product_type |
parent_product_id |
master_product_offers_count |
master_product_id |
company_id |
kl_enable_qc |
kl_qc_amount |
| 66758 |
Mask Fit Red Cushion 29N Natural Beige 4.5gm |
Roadskye Tradecom Pvt. Ltd. |
|
P |
0 |
0 |
0 |
13 |
0 |
0 |
| 69901 |
Waterfull Hyaluronic Acid Cooling Sunstick 18gm |
Roadskye Tradecom Pvt. Ltd. |
|
P |
0 |
0 |
0 |
13 |
0 |
0 |
| 39124 |
Calendula Complete Cleansing Oil Miniature - 25ml |
Roadskye Tradecom Pvt. Ltd. |
|
P |
0 |
0 |
0 |
13 |
0 |
0 |
| 67036 |
Water Parsley Silence Essence - 300ml |
Roadskye Tradecom Pvt. Ltd. |
|
P |
0 |
0 |
0 |
13 |
0 |
0 |
| 65175 |
Fish Body Oil for Men & Women | 1000mg Omega-3s with EPA & DHA | 60 Softgels |
Roadskye Tradecom Pvt. Ltd. |
|
P |
0 |
0 |
0 |
13 |
0 |
0 |
| 39922 |
Black Snail Collagen Serum 50ml |
Roadskye Tradecom Pvt. Ltd. |
MPL100196 |
P |
0 |
0 |
0 |
13 |
0 |
0 |
| 65547 |
Neaf Neaf Kaolin Purifying Wash Off Mask - 110g |
Roadskye Tradecom Pvt. Ltd. |
MPL100086 |
P |
0 |
0 |
0 |
13 |
0 |
0 |
| 65171 |
Triple Strength Fish Oil | Omega 3 Capsules | For Healthy Cholesterol Levels, Improved Focus, Healthy Vision & Joint Comfort 180gm |
Roadskye Tradecom Pvt. Ltd. |
|
P |
0 |
0 |
0 |
13 |
0 |
0 |