Query time 0.00220
JSON explain
{
"query_block": {
"select_id": 1,
"cost_info": {
"query_cost": "20.77"
},
"ordering_operation": {
"using_filesort": false,
"grouping_operation": {
"using_temporary_table": true,
"using_filesort": false,
"nested_loop": [
{
"table": {
"table_name": "variation_group_products",
"access_type": "range",
"possible_keys": [
"PRIMARY",
"idx_group_id"
],
"key": "idx_group_id",
"used_key_parts": [
"group_id"
],
"key_length": "3",
"rows_examined_per_scan": 22,
"rows_produced_per_join": 22,
"filtered": "100.00",
"index_condition": "(`cscart_db`.`variation_group_products`.`group_id` in (965,963,1112))",
"cost_info": {
"read_cost": "8.46",
"eval_cost": "2.20",
"prefix_cost": "10.66",
"data_read_per_join": "352"
},
"used_columns": [
"product_id",
"group_id"
]
}
},
{
"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.variation_group_products.product_id"
],
"rows_examined_per_scan": 1,
"rows_produced_per_join": 1,
"filtered": "5.00",
"cost_info": {
"read_cost": "5.82",
"eval_cost": "0.11",
"prefix_cost": "18.68",
"data_read_per_join": "5K"
},
"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`.`status` = 'A') and (`cscart_db`.`products`.`master_product_status` = 'A') and (`cscart_db`.`products`.`company_id` > 0))"
}
},
{
"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.variation_group_products.product_id"
],
"rows_examined_per_scan": 1,
"rows_produced_per_join": 1,
"filtered": "100.00",
"using_index": true,
"cost_info": {
"read_cost": "0.47",
"eval_cost": "0.13",
"prefix_cost": "19.28",
"data_read_per_join": "20"
},
"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": 1,
"filtered": "81.96",
"cost_info": {
"read_cost": "0.32",
"eval_cost": "0.10",
"prefix_cost": "19.72",
"data_read_per_join": "2K"
},
"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": "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.variation_group_products.product_id",
"const"
],
"rows_examined_per_scan": 1,
"rows_produced_per_join": 1,
"filtered": "100.00",
"cost_info": {
"read_cost": "0.62",
"eval_cost": "0.10",
"prefix_cost": "20.44",
"data_read_per_join": "4K"
},
"used_columns": [
"product_id",
"lang_code",
"product"
]
}
},
{
"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": 1,
"filtered": "100.00",
"cost_info": {
"read_cost": "0.23",
"eval_cost": "0.10",
"prefix_cost": "20.77",
"data_read_per_join": "7K"
},
"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)"
}
}
]
}
}
}
}
Result
| product_id |
amount |
product |
company_name |
kl_erp_inventory_id |
variation_group_id |
product_type |
parent_product_id |
master_product_offers_count |
master_product_id |
company_id |
kl_enable_qc |
kl_qc_amount |
| 68902 |
5 |
Dear Darling Oil Tint 01 Real Cherry |
Roadskye Tradecom Pvt. Ltd. |
|
963 |
P |
0 |
0 |
0 |
13 |
0 |
0 |
| 68903 |
32 |
Dear Darling Oil Tint 02 Plum Berry |
Roadskye Tradecom Pvt. Ltd. |
|
963 |
P |
0 |
0 |
0 |
13 |
0 |
0 |
| 68904 |
1 |
Dear Darling Oil Tint 03 Neon Pink |
Roadskye Tradecom Pvt. Ltd. |
|
963 |
P |
0 |
0 |
0 |
13 |
0 |
0 |
| 68906 |
3 |
Dear Darling Oil Tint 05 Red oil |
Roadskye Tradecom Pvt. Ltd. |
|
963 |
P |
0 |
0 |
0 |
13 |
0 |
0 |
| 68907 |
11 |
Dear Darling Oil Tint 06 Pink oil |
Roadskye Tradecom Pvt. Ltd. |
|
963 |
P |
0 |
0 |
0 |
13 |
0 |
0 |
| 68896 |
5 |
Dear Darling Marker Tint 01 Raspberry Pop |
Roadskye Tradecom Pvt. Ltd. |
|
965 |
P |
0 |
0 |
0 |
13 |
0 |
0 |
| 68899 |
16 |
Dear Darling Marker Tint 04 Milk Strawberry |
Roadskye Tradecom Pvt. Ltd. |
|
965 |
P |
0 |
0 |
0 |
13 |
0 |
0 |
| 68897 |
13 |
Dear Darling Marker Tint 02 Mono Plum |
Roadskye Tradecom Pvt. Ltd. |
|
965 |
P |
0 |
0 |
0 |
13 |
0 |
0 |
| 68900 |
5 |
Dear Darling Marker Tint 05 Pink Tangerine |
Roadskye Tradecom Pvt. Ltd. |
|
965 |
P |
0 |
0 |
0 |
13 |
0 |
0 |
| 68901 |
2 |
Dear Darling Marker Tint 06 Grape Soda |
Roadskye Tradecom Pvt. Ltd. |
|
965 |
P |
0 |
0 |
0 |
13 |
0 |
0 |
| 68978 |
15 |
My Lipstick #803 My Orange 3.5gm |
Roadskye Tradecom Pvt. Ltd. |
|
1112 |
P |
0 |
0 |
0 |
13 |
0 |
0 |
| 68977 |
14 |
My Lipstick #802 My Cherry Red 3.5gm |
Roadskye Tradecom Pvt. Ltd. |
|
1112 |
P |
0 |
0 |
0 |
13 |
0 |
0 |
| 68979 |
15 |
My Lipstick #804 My Coral 3.5gm |
Roadskye Tradecom Pvt. Ltd. |
|
1112 |
P |
0 |
0 |
0 |
13 |
0 |
0 |
| 68980 |
15 |
My Lipstick #805 My Light Coral 3.5gm |
Roadskye Tradecom Pvt. Ltd. |
|
1112 |
P |
0 |
0 |
0 |
13 |
0 |
0 |
| 68981 |
15 |
My Lipstick #806 My Rose 3.5gm |
Roadskye Tradecom Pvt. Ltd. |
|
1112 |
P |
0 |
0 |
0 |
13 |
0 |
0 |
| 68982 |
15 |
My Lipstick #808 My Warm Red 3.5gm |
Roadskye Tradecom Pvt. Ltd. |
|
1112 |
P |
0 |
0 |
0 |
13 |
0 |
0 |
| 68983 |
15 |
My Lipstick #809 My Chili Red 3.5gm |
Roadskye Tradecom Pvt. Ltd. |
|
1112 |
P |
0 |
0 |
0 |
13 |
0 |
0 |
| 68984 |
15 |
My Lipstick #810 My Brick Red 3.5gm |
Roadskye Tradecom Pvt. Ltd. |
|
1112 |
P |
0 |
0 |
0 |
13 |
0 |
0 |