Query time 0.00284
JSON explain
{
"query_block": {
"select_id": 1,
"cost_info": {
"query_cost": "58.84"
},
"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": 60,
"rows_produced_per_join": 60,
"filtered": "100.00",
"index_condition": "(`softwarepirmam_hewadelivard_cscart_4`.`variation_group_products`.`group_id` in (1135,1068,1127,1158,1108,1130,1119,1120,1150,1182,1065,1140,1157,1089,1106,1069,1072,1136,1156,1161))",
"using_join_buffer": "hash join",
"cost_info": {
"read_cost": "26.01",
"eval_cost": "6.00",
"prefix_cost": "33.57",
"data_read_per_join": "960"
},
"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": 3,
"filtered": "5.00",
"cost_info": {
"read_cost": "15.00",
"eval_cost": "0.30",
"prefix_cost": "54.57",
"data_read_per_join": "13K"
},
"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": 6,
"filtered": "100.00",
"cost_info": {
"read_cost": "1.50",
"eval_cost": "0.60",
"prefix_cost": "56.67",
"data_read_per_join": "96"
},
"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.50",
"eval_cost": "0.03",
"prefix_cost": "58.77",
"data_read_per_join": "962"
},
"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.04",
"eval_cost": "0.03",
"prefix_cost": "58.84",
"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 |
| 11088 |
100 |
Ray-Ban RB2180 51mm |
Delivard Store |
1065 |
V |
11089 |
| 11089 |
100 |
Ray-Ban RB2180 51mm |
Delivard Store |
1065 |
P |
0 |
| 11087 |
100 |
Ray-Ban RB2180 51mm |
Delivard Store |
1065 |
V |
11089 |
| 11109 |
100 |
Ray-Ban Thalia 53mm |
Delivard Store |
1068 |
V |
11108 |
| 11108 |
100 |
Ray-Ban Thalia 53mm |
Delivard Store |
1068 |
P |
0 |
| 11110 |
100 |
Ray-Ban Elliot 52mm |
Delivard Store |
1069 |
P |
0 |
| 11111 |
100 |
Ray-Ban Elliot 52mm |
Delivard Store |
1069 |
V |
11110 |
| 11125 |
100 |
Ray-Ban RB2203 55mm |
Delivard Store |
1072 |
V |
11123 |
| 11124 |
100 |
Ray-Ban RB2203 55mm |
Delivard Store |
1072 |
V |
11123 |
| 11123 |
100 |
Ray-Ban RB2203 55mm |
Delivard Store |
1072 |
P |
0 |
| 11263 |
100 |
Ray-Ban Round Flat Lenses 53mm |
Delivard Store |
1089 |
P |
0 |
| 11265 |
100 |
Ray-Ban Round Flat Lenses 53mm |
Delivard Store |
1089 |
V |
11263 |
| 11336 |
100 |
Ray-Ban RB3588 55mm |
Delivard Store |
1106 |
P |
0 |
| 11339 |
100 |
Ray-Ban RB3588 55mm |
Delivard Store |
1106 |
V |
11336 |
| 11340 |
100 |
Ray-Ban RB3588 55mm |
Delivard Store |
1106 |
V |
11336 |
| 11343 |
100 |
Ray-Ban Balorama 62mm |
Delivard Store |
1108 |
P |
0 |
| 11345 |
100 |
Ray-Ban Balorama 62mm |
Delivard Store |
1108 |
V |
11343 |
| 11346 |
100 |
Ray-Ban Balorama 62mm |
Delivard Store |
1108 |
V |
11343 |
| 11366 |
100 |
Ray-Ban ANH Bio-Based 66mm |
Delivard Store |
1119 |
P |
0 |
| 11367 |
100 |
Ray-Ban ANH Bio-Based 66mm |
Delivard Store |
1119 |
V |
11366 |
| 11370 |
100 |
Ray-Ban Bain Bridge 57mm |
Delivard Store |
1120 |
P |
0 |
| 11371 |
100 |
Ray-Ban Bain Bridge 57mm |
Delivard Store |
1120 |
V |
11370 |
| 11394 |
100 |
Ray-Ban Wayfarer Reverse 53mm |
Delivard Store |
1127 |
P |
0 |
| 11395 |
100 |
Ray-Ban Wayfarer Reverse 53mm |
Delivard Store |
1127 |
V |
11394 |
| 11396 |
100 |
Ray-Ban Wayfarer Reverse 53mm |
Delivard Store |
1127 |
V |
11394 |
| 11397 |
100 |
Ray-Ban Wayfarer Reverse 53mm |
Delivard Store |
1127 |
V |
11394 |
| 11398 |
100 |
Ray-Ban Wayfarer Reverse 53mm |
Delivard Store |
1127 |
V |
11394 |
| 11406 |
100 |
Ray-Ban Aviator Titanium 62mm |
Delivard Store |
1130 |
P |
0 |
| 11407 |
100 |
Ray-Ban Aviator Titanium 62mm |
Delivard Store |
1130 |
V |
11406 |
| 11418 |
100 |
Ray-Ban RB3713D 57mm |
Delivard Store |
1135 |
P |
0 |
| 11419 |
100 |
Ray-Ban RB3713D 57mm |
Delivard Store |
1135 |
V |
11418 |
| 11420 |
100 |
Ray-Ban RB3713D 57mm |
Delivard Store |
1135 |
V |
11418 |
| 11421 |
100 |
Ray-Ban RB3713D 57mm |
Delivard Store |
1135 |
V |
11418 |
| 11422 |
100 |
Ray-Ban Jim 53mm |
Delivard Store |
1136 |
P |
0 |
| 11423 |
100 |
Ray-Ban Jim 53mm |
Delivard Store |
1136 |
V |
11422 |
| 11424 |
100 |
Ray-Ban Jim 53mm |
Delivard Store |
1136 |
V |
11422 |
| 11425 |
100 |
Ray-Ban Jim 53mm |
Delivard Store |
1136 |
V |
11422 |
| 11434 |
100 |
Ray-Ban RB3749 58mm |
Delivard Store |
1140 |
P |
0 |
| 11435 |
100 |
Ray-Ban RB3749 58mm |
Delivard Store |
1140 |
V |
11434 |
| 11436 |
100 |
Ray-Ban RB3749 58mm |
Delivard Store |
1140 |
V |
11434 |
| 11469 |
100 |
Ray-Ban Old Aviator 58mm |
Delivard Store |
1150 |
P |
0 |
| 11470 |
100 |
Ray-Ban Old Aviator 58mm |
Delivard Store |
1150 |
V |
11469 |
| 11471 |
100 |
Ray-Ban Old Aviator 58mm |
Delivard Store |
1150 |
V |
11469 |
| 11487 |
100 |
Ray-Ban RB3774D 55mm |
Delivard Store |
1156 |
P |
0 |
| 11488 |
100 |
Ray-Ban RB3774D 55mm |
Delivard Store |
1156 |
V |
11487 |
| 11489 |
100 |
Ray-Ban RB3774D 55mm |
Delivard Store |
1156 |
V |
11487 |
| 11490 |
100 |
Ray-Ban RB3721 59mm |
Delivard Store |
1157 |
P |
0 |
| 11491 |
100 |
Ray-Ban RB3721 59mm |
Delivard Store |
1157 |
V |
11490 |
| 11492 |
100 |
Ray-Ban RB3721 59mm |
Delivard Store |
1157 |
V |
11490 |
| 11493 |
100 |
Ray-Ban RB3724D 59mm |
Delivard Store |
1158 |
P |
0 |
| 11494 |
100 |
Ray-Ban RB3724D 59mm |
Delivard Store |
1158 |
V |
11493 |
| 11495 |
100 |
Ray-Ban RB3724D 59mm |
Delivard Store |
1158 |
V |
11493 |
| 11505 |
100 |
Ray-Ban RB3751 61mm |
Delivard Store |
1161 |
P |
0 |
| 11506 |
100 |
Ray-Ban RB3751 61mm |
Delivard Store |
1161 |
V |
11505 |
| 11507 |
100 |
Ray-Ban RB3751 61mm |
Delivard Store |
1161 |
V |
11505 |
| 11592 |
100 |
Ray-Ban RB3754 60mm |
Delivard Store |
1182 |
P |
0 |
| 11593 |
100 |
Ray-Ban RB3754 60mm |
Delivard Store |
1182 |
V |
11592 |
| 11594 |
100 |
Ray-Ban RB3754 60mm |
Delivard Store |
1182 |
V |
11592 |