Query time 0.00219
JSON explain
{
"query_block": {
"select_id": 1,
"cost_info": {
"query_cost": "16.20"
},
"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": 16,
"rows_produced_per_join": 16,
"filtered": "100.00",
"index_condition": "(`softwarepirmam_hewadelivard_cscart_4`.`variation_group_products`.`group_id` in (872,877,908,881,892,893,875,895))",
"cost_info": {
"read_cost": "7.61",
"eval_cost": "1.60",
"prefix_cost": "9.21",
"data_read_per_join": "256"
},
"used_columns": [
"product_id",
"group_id"
]
}
},
{
"table": {
"table_name": "products",
"access_type": "eq_ref",
"possible_keys": [
"PRIMARY",
"status"
],
"key": "PRIMARY",
"used_key_parts": [
"product_id"
],
"key_length": "3",
"ref": [
"softwarepirmam_hewadelivard_cscart_4.variation_group_products.product_id"
],
"rows_examined_per_scan": 1,
"rows_produced_per_join": 2,
"filtered": "17.71",
"cost_info": {
"read_cost": "4.00",
"eval_cost": "0.28",
"prefix_cost": "14.81",
"data_read_per_join": "12K"
},
"used_columns": [
"product_id",
"product_type",
"status",
"company_id",
"amount",
"usergroup_ids",
"tracking",
"parent_product_id"
],
"attached_condition": "(((`softwarepirmam_hewadelivard_cscart_4`.`products`.`amount` > 0) or (`softwarepirmam_hewadelivard_cscart_4`.`products`.`tracking` = 'D')) and ((`softwarepirmam_hewadelivard_cscart_4`.`products`.`usergroup_ids` = '') or (0 <> find_in_set(0,`softwarepirmam_hewadelivard_cscart_4`.`products`.`usergroup_ids`)) or (0 <> find_in_set(1,`softwarepirmam_hewadelivard_cscart_4`.`products`.`usergroup_ids`))) and (`softwarepirmam_hewadelivard_cscart_4`.`products`.`status` = 'A') and (`softwarepirmam_hewadelivard_cscart_4`.`products`.`product_type` <> 'D'))"
}
},
{
"table": {
"table_name": "companies",
"access_type": "eq_ref",
"possible_keys": [
"PRIMARY"
],
"key": "PRIMARY",
"used_key_parts": [
"company_id"
],
"key_length": "4",
"ref": [
"softwarepirmam_hewadelivard_cscart_4.products.company_id"
],
"rows_examined_per_scan": 1,
"rows_produced_per_join": 0,
"filtered": "10.00",
"cost_info": {
"read_cost": "0.71",
"eval_cost": "0.03",
"prefix_cost": "15.80",
"data_read_per_join": "1K"
},
"used_columns": [
"company_id",
"status",
"company"
],
"attached_condition": "(`softwarepirmam_hewadelivard_cscart_4`.`companies`.`status` = 'A')"
}
},
{
"table": {
"table_name": "products_categories",
"access_type": "ref",
"possible_keys": [
"PRIMARY",
"pt"
],
"key": "pt",
"used_key_parts": [
"product_id"
],
"key_length": "3",
"ref": [
"softwarepirmam_hewadelivard_cscart_4.variation_group_products.product_id"
],
"rows_examined_per_scan": 2,
"rows_produced_per_join": 0,
"filtered": "100.00",
"cost_info": {
"read_cost": "0.14",
"eval_cost": "0.06",
"prefix_cost": "16.00",
"data_read_per_join": "9"
},
"used_columns": [
"product_id",
"category_id"
]
}
},
{
"table": {
"table_name": "cscart_categories",
"access_type": "eq_ref",
"possible_keys": [
"PRIMARY",
"c_status",
"p_category_id"
],
"key": "PRIMARY",
"used_key_parts": [
"category_id"
],
"key_length": "3",
"ref": [
"softwarepirmam_hewadelivard_cscart_4.products_categories.category_id"
],
"rows_examined_per_scan": 1,
"rows_produced_per_join": 0,
"filtered": "5.00",
"cost_info": {
"read_cost": "0.14",
"eval_cost": "0.00",
"prefix_cost": "16.20",
"data_read_per_join": "90"
},
"used_columns": [
"category_id",
"storefront_id",
"usergroup_ids",
"status"
],
"attached_condition": "(((`softwarepirmam_hewadelivard_cscart_4`.`cscart_categories`.`usergroup_ids` = '') or (0 <> find_in_set(0,`softwarepirmam_hewadelivard_cscart_4`.`cscart_categories`.`usergroup_ids`)) or (0 <> find_in_set(1,`softwarepirmam_hewadelivard_cscart_4`.`cscart_categories`.`usergroup_ids`))) and (`softwarepirmam_hewadelivard_cscart_4`.`cscart_categories`.`status` in ('A','H')) and (`softwarepirmam_hewadelivard_cscart_4`.`cscart_categories`.`storefront_id` in (0,1)))"
}
},
{
"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": [
"softwarepirmam_hewadelivard_cscart_4.variation_group_products.product_id",
"const"
],
"rows_examined_per_scan": 1,
"rows_produced_per_join": 0,
"filtered": "100.00",
"cost_info": {
"read_cost": "0.00",
"eval_cost": "0.00",
"prefix_cost": "16.20",
"data_read_per_join": "132"
},
"used_columns": [
"product_id",
"lang_code",
"product"
]
}
}
]
}
}
}
}
Result
| product_id |
amount |
product |
company_name |
variation_group_id |
product_type |
parent_product_id |
| 9077 |
100 |
Yves Saint Laurent L’Homme Eau de Toilette - Brown |
Delivard Store |
872 |
V |
9076 |
| 9076 |
100 |
Yves Saint Laurent L’Homme Eau de Toilette - Brown |
Delivard Store |
872 |
P |
0 |
| 9110 |
100 |
Tom Ford Ombre Leather Parfum |
Delivard Store |
875 |
P |
0 |
| 9111 |
100 |
Tom Ford Ombre Leather Parfum |
Delivard Store |
875 |
V |
9110 |
| 9124 |
100 |
Tom Ford Noir Extreme EDP |
Delivard Store |
877 |
P |
0 |
| 9125 |
100 |
Tom Ford Noir Extreme EDP |
Delivard Store |
877 |
V |
9124 |
| 9234 |
100 |
Chanel Bleu Eau de Toilette |
Delivard Store |
881 |
P |
0 |
| 9235 |
100 |
Chanel Bleu Eau de Toilette |
Delivard Store |
881 |
V |
9234 |
| 9450 |
100 |
Davidoff Horizon Eau de Toilette |
Delivard Store |
892 |
V |
9451 |
| 9451 |
100 |
Davidoff Horizon Eau de Toilette |
Delivard Store |
892 |
P |
0 |
| 9454 |
100 |
Diesel Only The Brave Eau de Toilette for Men |
Delivard Store |
893 |
V |
9455 |
| 9455 |
100 |
Diesel Only The Brave Eau de Toilette for Men |
Delivard Store |
893 |
P |
0 |
| 9465 |
100 |
Mont Blanc Legend Eau de Toilette |
Delivard Store |
895 |
P |
0 |
| 9466 |
100 |
Mont Blanc Legend Eau de Toilette |
Delivard Store |
895 |
V |
9465 |
| 9829 |
100 |
Hermès H24 Eau de Toilette |
Delivard Store |
908 |
V |
9816 |
| 9816 |
100 |
Hermès H24 Eau de Toilette |
Delivard Store |
908 |
P |
0 |