Query time 0.06251
JSON explain
{
"query_block": {
"select_id": 1,
"cost_info": {
"query_cost": "1782.64"
},
"ordering_operation": {
"using_temporary_table": true,
"using_filesort": true,
"grouping_operation": {
"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",
"access_type": "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": "status",
"used_key_parts": [
"status"
],
"key_length": "3",
"ref": [
"const"
],
"rows_examined_per_scan": 8877,
"rows_produced_per_join": 5,
"filtered": "0.07",
"cost_info": {
"read_cost": "880.95",
"eval_cost": "0.59",
"prefix_cost": "1768.65",
"data_read_per_join": "30K"
},
"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`.`parent_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`.`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": 5,
"filtered": "100.00",
"cost_info": {
"read_cost": "4.03",
"eval_cost": "0.59",
"prefix_cost": "1773.27",
"data_read_per_join": "27K"
},
"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": "product_id",
"used_key_parts": [
"product_id"
],
"key_length": "3",
"ref": [
"cscart_db.products.product_id"
],
"rows_examined_per_scan": 1,
"rows_produced_per_join": 5,
"filtered": "100.00",
"using_index": true,
"cost_info": {
"read_cost": "1.48",
"eval_cost": "0.59",
"prefix_cost": "1775.34",
"data_read_per_join": "142"
},
"used_columns": [
"product_id",
"lower_limit",
"usergroup_id"
],
"attached_condition": "<if>(is_not_null_compl(prices), ((`cscart_db`.`prices`.`lower_limit` = 1) and (`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": 5,
"filtered": "100.00",
"cost_info": {
"read_cost": "1.48",
"eval_cost": "0.59",
"prefix_cost": "1777.41",
"data_read_per_join": "41K"
},
"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",
"category_id"
],
"key_length": "6",
"ref": [
"cscart_db.products.product_id",
"const"
],
"rows_examined_per_scan": 1,
"rows_produced_per_join": 5,
"filtered": "100.00",
"using_index": true,
"cost_info": {
"read_cost": "2.54",
"eval_cost": "0.60",
"prefix_cost": "1780.55",
"data_read_per_join": "95"
},
"used_columns": [
"product_id",
"category_id"
]
}
},
{
"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.product_id"
],
"rows_examined_per_scan": 1,
"rows_produced_per_join": 5,
"filtered": "100.00",
"using_index": true,
"cost_info": {
"read_cost": "1.50",
"eval_cost": "0.60",
"prefix_cost": "1782.64",
"data_read_per_join": "95"
},
"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 |
| 38085 |
The Miss Fizz Glaze Mani/Pedi Kit |
Roadskye Tradecom Pvt. Ltd. |
|
P |
0 |
0 |
0 |
13 |
0 |
0 |
| 64323 |
Magicpress Dreaming Garden |
Roadskye Tradecom Pvt. Ltd. |
MPL100358 |
P |
0 |
0 |
0 |
13 |
0 |
0 |
| 64324 |
Magicpress Chione |
Roadskye Tradecom Pvt. Ltd. |
MPL100357 |
P |
0 |
0 |
0 |
13 |
0 |
0 |
| 64325 |
Magicpress Glare |
Roadskye Tradecom Pvt. Ltd. |
MPL100356 |
P |
0 |
0 |
0 |
13 |
0 |
0 |
| 64326 |
Magicpress White Marble |
Roadskye Tradecom Pvt. Ltd. |
MPL100355 |
P |
0 |
0 |
0 |
13 |
0 |
0 |
| 64328 |
Magicpress Drawing Heart |
Roadskye Tradecom Pvt. Ltd. |
MPL100354 |
P |
0 |
0 |
0 |
13 |
0 |
0 |
| 64329 |
Magicpress Emotion |
Roadskye Tradecom Pvt. Ltd. |
MPL100353 |
P |
0 |
0 |
0 |
13 |
0 |
0 |
| 64339 |
Magicpress Marble Mirrorlong (Oval) |
Roadskye Tradecom Pvt. Ltd. |
MPL100344 |
P |
0 |
0 |
0 |
13 |
0 |
0 |
| 64341 |
Magicpress Pink Ocean (Almond) |
Roadskye Tradecom Pvt. Ltd. |
MPL100342 |
P |
0 |
0 |
0 |
13 |
0 |
0 |
| 64342 |
MAGICPRESS Gold Sugar (Pedi) |
Roadskye Tradecom Pvt. Ltd. |
|
P |
0 |
0 |
0 |
13 |
0 |
0 |
| 64343 |
Magicpress Black Aurora (Pedi) |
Roadskye Tradecom Pvt. Ltd. |
MPL100340 |
P |
0 |
0 |
0 |
13 |
0 |
0 |
| 64344 |
Magicpress Glory Silver (Pedi) |
Roadskye Tradecom Pvt. Ltd. |
MPL100339 |
P |
0 |
0 |
0 |
13 |
0 |
0 |
| 64352 |
Magicpress Shimmer Quilting |
Roadskye Tradecom Pvt. Ltd. |
MPL100329 |
P |
0 |
0 |
0 |
13 |
0 |
0 |
| 66796 |
DASHING DIVA GLOW MILKY WAY |
Roadskye Tradecom Pvt. Ltd. |
|
P |
0 |
0 |
0 |
13 |
0 |
0 |
| 64337 |
Magicpress Pearl Grey (Coffin) |
Roadskye Tradecom Pvt. Ltd. |
MPL100346 |
P |
0 |
0 |
0 |
13 |
0 |
0 |
| 64340 |
Magicpress Glory Bluelong (Oval) |
Roadskye Tradecom Pvt. Ltd. |
MPL100343 |
P |
0 |
0 |
0 |
13 |
0 |
0 |
| 64345 |
Magicpress Bubble (Pedi) |
Roadskye Tradecom Pvt. Ltd. |
MPL100338 |
P |
0 |
0 |
0 |
13 |
0 |
0 |
| 64346 |
Magicpress Cream Cheese (Pedi) |
Roadskye Tradecom Pvt. Ltd. |
MPL100337 |
P |
0 |
0 |
0 |
13 |
0 |
0 |
| 64347 |
Magicpress Dark Blue (Pedi) |
Roadskye Tradecom Pvt. Ltd. |
MPL100336 |
P |
0 |
0 |
0 |
13 |
0 |
0 |
| 64551 |
Magic Press Spangle |
Roadskye Tradecom Pvt. Ltd. |
|
P |
0 |
0 |
0 |
13 |
0 |
0 |
| 64335 |
Magicpress Cheek Shine (Coffin) |
Roadskye Tradecom Pvt. Ltd. |
MPL100348 |
P |
0 |
0 |
0 |
13 |
0 |
0 |
| 64348 |
Magicpress Pearl French (Coffin) |
Roadskye Tradecom Pvt. Ltd. |
MPL100335 |
P |
0 |
0 |
0 |
13 |
0 |
0 |
| 64338 |
Magicpress Glittery (Coffin) |
Roadskye Tradecom Pvt. Ltd. |
MPL100345 |
P |
0 |
0 |
0 |
13 |
0 |
0 |
| 38081 |
Glaze semi-cured gel Moonlit |
Roadskye Tradecom Pvt. Ltd. |
|
P |
0 |
0 |
0 |
13 |
0 |
0 |