Query time 0.00365
JSON explain
{
"query_block": {
"select_id": 1,
"cost_info": {
"query_cost": "45.14"
},
"ordering_operation": {
"using_filesort": false,
"grouping_operation": {
"using_temporary_table": true,
"using_filesort": false,
"nested_loop": [
{
"table": {
"table_name": "companies",
"access_type": "ALL",
"possible_keys": [
"PRIMARY"
],
"rows_examined_per_scan": 10,
"rows_produced_per_join": 1,
"filtered": "10.00",
"cost_info": {
"read_cost": "1.46",
"eval_cost": "0.10",
"prefix_cost": "1.56",
"data_read_per_join": "6K"
},
"used_columns": [
"company_id",
"status",
"company"
],
"attached_condition": "(`softwarepirmam_hewadelivard_cscart_4`.`companies`.`status` = 'A')"
}
},
{
"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": 46,
"rows_produced_per_join": 46,
"filtered": "100.00",
"index_condition": "(`softwarepirmam_hewadelivard_cscart_4`.`variation_group_products`.`group_id` in (236,231,274,259,267,271,233,238,237,298,262,388,270,296))",
"using_join_buffer": "hash join",
"cost_info": {
"read_cost": "19.61",
"eval_cost": "4.60",
"prefix_cost": "25.77",
"data_read_per_join": "736"
},
"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": "5.00",
"cost_info": {
"read_cost": "11.50",
"eval_cost": "0.23",
"prefix_cost": "41.87",
"data_read_per_join": "10K"
},
"used_columns": [
"product_id",
"product_type",
"status",
"company_id",
"amount",
"usergroup_ids",
"tracking",
"parent_product_id"
],
"attached_condition": "((`softwarepirmam_hewadelivard_cscart_4`.`products`.`company_id` = `softwarepirmam_hewadelivard_cscart_4`.`companies`.`company_id`) and ((`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": "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": 4,
"filtered": "100.00",
"cost_info": {
"read_cost": "1.15",
"eval_cost": "0.46",
"prefix_cost": "43.48",
"data_read_per_join": "73"
},
"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": "1.15",
"eval_cost": "0.02",
"prefix_cost": "45.09",
"data_read_per_join": "737"
},
"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.03",
"eval_cost": "0.02",
"prefix_cost": "45.14",
"data_read_per_join": "1K"
},
"used_columns": [
"product_id",
"lang_code",
"product"
]
}
}
]
}
}
}
}
Result
| product_id |
amount |
product |
company_name |
variation_group_id |
product_type |
parent_product_id |
| 2587 |
99 |
JBL Tune 110 Earphones |
Delivard Store |
231 |
P |
0 |
| 2588 |
100 |
JBL Tune 110 Earphones |
Delivard Store |
231 |
V |
2587 |
| 2589 |
100 |
JBL Tune 110 Earphones |
Delivard Store |
231 |
V |
2587 |
| 2590 |
100 |
JBL Tune 110 Earphones |
Delivard Store |
231 |
V |
2587 |
| 2593 |
100 |
JBL T310C Wired earphone Type C |
Delivard Store |
233 |
P |
0 |
| 2594 |
100 |
JBL T310C Wired earphone Type C |
Delivard Store |
233 |
V |
2593 |
| 2595 |
100 |
JBL T310C Wired earphone Type C |
Delivard Store |
233 |
V |
2593 |
| 2603 |
100 |
JBL T305C Wired earphone Type C |
Delivard Store |
236 |
P |
0 |
| 2609 |
100 |
JBL T305C Wired earphone Type C |
Delivard Store |
236 |
V |
2603 |
| 2610 |
100 |
JBL T305C Wired earphone Type C |
Delivard Store |
236 |
V |
2603 |
| 2611 |
100 |
JBL T305C Wired earphone Type C |
Delivard Store |
236 |
V |
2603 |
| 2613 |
100 |
JBL Jr310 Kids on-ear Headphones |
Delivard Store |
237 |
P |
0 |
| 2614 |
100 |
JBL Jr310 Kids on-ear Headphones |
Delivard Store |
237 |
V |
2613 |
| 2617 |
100 |
JBL Tune 125BT Bluetooth |
Delivard Store |
238 |
V |
2618 |
| 2618 |
100 |
JBL Tune 125BT Bluetooth |
Delivard Store |
238 |
P |
0 |
| 2696 |
100 |
JBL Tune 520BT Headphone |
Delivard Store |
259 |
V |
2694 |
| 2697 |
100 |
JBL Tune 520BT Headphone |
Delivard Store |
259 |
V |
2694 |
| 2695 |
100 |
JBL Tune 520BT Headphone |
Delivard Store |
259 |
V |
2694 |
| 2694 |
100 |
JBL Tune 520BT Headphone |
Delivard Store |
259 |
P |
0 |
| 2704 |
100 |
JBL Jr310BT |
Delivard Store |
262 |
P |
0 |
| 2705 |
100 |
JBL Jr310BT |
Delivard Store |
262 |
V |
2704 |
| 2706 |
100 |
JBL Jr310BT |
Delivard Store |
262 |
V |
2704 |
| 2723 |
100 |
JBL Tune 720BT Headphone |
Delivard Store |
267 |
P |
0 |
| 2724 |
100 |
JBL Tune 720BT Headphone |
Delivard Store |
267 |
V |
2723 |
| 2725 |
100 |
JBL Tune 720BT Headphone |
Delivard Store |
267 |
V |
2723 |
| 2726 |
100 |
JBL Tune 720BT Headphone |
Delivard Store |
267 |
V |
2723 |
| 2739 |
100 |
JBL JR470 Noise Cancelling Kids Headphones |
Delivard Store |
270 |
P |
0 |
| 2740 |
100 |
JBL JR470 Noise Cancelling Kids Headphones |
Delivard Store |
270 |
V |
2739 |
| 2741 |
100 |
JBL JR470 Noise Cancelling Kids Headphones |
Delivard Store |
270 |
V |
2739 |
| 2742 |
100 |
JBL Tune 770NC Headphone |
Delivard Store |
271 |
P |
0 |
| 2743 |
100 |
JBL Tune 770NC Headphone |
Delivard Store |
271 |
V |
2742 |
| 2744 |
100 |
JBL Tune 770NC Headphone |
Delivard Store |
271 |
V |
2742 |
| 2745 |
100 |
JBL Tune 770NC Headphone |
Delivard Store |
271 |
V |
2742 |
| 2761 |
100 |
JBL Live 670NC |
Delivard Store |
274 |
P |
0 |
| 2762 |
100 |
JBL Live 670NC |
Delivard Store |
274 |
V |
2761 |
| 2763 |
100 |
JBL Live 670NC |
Delivard Store |
274 |
V |
2761 |
| 2764 |
100 |
JBL Live 670NC |
Delivard Store |
274 |
V |
2761 |
| 2865 |
100 |
JBL Live 660NC Headphone |
Delivard Store |
296 |
P |
0 |
| 2872 |
100 |
JBL Tune 710BT Headphone |
Delivard Store |
298 |
P |
0 |
| 2873 |
100 |
JBL Tune 710BT Headphone |
Delivard Store |
298 |
V |
2872 |
| 2874 |
100 |
JBL Tune 710BT Headphone |
Delivard Store |
298 |
V |
2872 |
| 2875 |
100 |
JBL Tune 710BT Headphone |
Delivard Store |
298 |
V |
2872 |
| 3423 |
100 |
JBL Tune 215BT |
Delivard Store |
388 |
P |
0 |
| 3422 |
100 |
JBL Tune 215BT |
Delivard Store |
388 |
V |
3423 |