Query time 0.00592
JSON explain
{
"query_block": {
"select_id": 1,
"cost_info": {
"query_cost": "38.78"
},
"ordering_operation": {
"using_filesort": true,
"grouping_operation": {
"using_temporary_table": true,
"using_filesort": false,
"nested_loop": [
{
"table": {
"table_name": "cscart_categories",
"access_type": "range",
"possible_keys": [
"PRIMARY",
"c_status",
"p_category_id"
],
"key": "PRIMARY",
"used_key_parts": [
"category_id"
],
"key_length": "3",
"rows_examined_per_scan": 8,
"rows_produced_per_join": 0,
"filtered": "4.00",
"index_condition": "(`softwarepirmam_hewadelivard_cscart_4`.`cscart_categories`.`category_id` in (351,414,415,429,613,430,446,648))",
"cost_info": {
"read_cost": "5.58",
"eval_cost": "0.03",
"prefix_cost": "5.61",
"data_read_per_join": "1K"
},
"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": "companies",
"access_type": "ALL",
"possible_keys": [
"PRIMARY"
],
"rows_examined_per_scan": 10,
"rows_produced_per_join": 0,
"filtered": "10.00",
"using_join_buffer": "hash join",
"cost_info": {
"read_cost": "1.46",
"eval_cost": "0.03",
"prefix_cost": "7.11",
"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": "PRIMARY",
"used_key_parts": [
"category_id"
],
"key_length": "3",
"ref": [
"softwarepirmam_hewadelivard_cscart_4.cscart_categories.category_id"
],
"rows_examined_per_scan": 194,
"rows_produced_per_join": 62,
"filtered": "100.00",
"using_index": true,
"cost_info": {
"read_cost": "0.47",
"eval_cost": "6.21",
"prefix_cost": "13.78",
"data_read_per_join": "993"
},
"used_columns": [
"product_id",
"category_id"
]
}
},
{
"table": {
"table_name": "products",
"access_type": "eq_ref",
"possible_keys": [
"PRIMARY",
"status",
"idx_parent_product_id"
],
"key": "PRIMARY",
"used_key_parts": [
"product_id"
],
"key_length": "3",
"ref": [
"softwarepirmam_hewadelivard_cscart_4.products_categories.product_id"
],
"rows_examined_per_scan": 1,
"rows_produced_per_join": 3,
"filtered": "5.00",
"cost_info": {
"read_cost": "15.52",
"eval_cost": "0.31",
"prefix_cost": "35.51",
"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`.`parent_product_id` = 0) 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": "prices",
"access_type": "ref",
"possible_keys": [
"usergroup",
"product_id",
"lower_limit",
"usergroup_id"
],
"key": "product_id",
"used_key_parts": [
"product_id"
],
"key_length": "3",
"ref": [
"softwarepirmam_hewadelivard_cscart_4.products_categories.product_id"
],
"rows_examined_per_scan": 1,
"rows_produced_per_join": 3,
"filtered": "99.93",
"cost_info": {
"read_cost": "0.78",
"eval_cost": "0.31",
"prefix_cost": "36.59",
"data_read_per_join": "74"
},
"used_columns": [
"product_id",
"lower_limit",
"usergroup_id"
],
"attached_condition": "((`softwarepirmam_hewadelivard_cscart_4`.`prices`.`lower_limit` = 1) and (`softwarepirmam_hewadelivard_cscart_4`.`prices`.`usergroup_id` in (0,0,1)))"
}
},
{
"table": {
"table_name": "popularity",
"access_type": "eq_ref",
"possible_keys": [
"PRIMARY",
"total"
],
"key": "PRIMARY",
"used_key_parts": [
"product_id"
],
"key_length": "3",
"ref": [
"softwarepirmam_hewadelivard_cscart_4.products_categories.product_id"
],
"rows_examined_per_scan": 1,
"rows_produced_per_join": 3,
"filtered": "100.00",
"cost_info": {
"read_cost": "0.78",
"eval_cost": "0.31",
"prefix_cost": "37.68",
"data_read_per_join": "99"
},
"used_columns": [
"product_id",
"total"
]
}
},
{
"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.products_categories.product_id",
"const"
],
"rows_examined_per_scan": 1,
"rows_produced_per_join": 3,
"filtered": "100.00",
"cost_info": {
"read_cost": "0.79",
"eval_cost": "0.31",
"prefix_cost": "38.78",
"data_read_per_join": "14K"
},
"used_columns": [
"product_id",
"lang_code",
"product"
]
}
}
]
}
}
}
}
Result
| product_id |
product |
company_name |
product_type |
parent_product_id |
| 2216 |
APC Back-UPS, 1600VA Tower |
Delivard Store |
P |
0 |
| 2206 |
بطارية ماكسما UPS بسعة 18 أمبير ساعة |
Delivard Store |
P |
0 |
| 3826 |
بايكرون محول سفر عالمي |
Delivard Store |
P |
0 |
| 2129 |
Maxma Line Interactive UPS 850VA |
Delivard Store |
P |
0 |
| 2354 |
Xiaomi Mi Smart Plug (Zigbee) |
Delivard Store |
P |
0 |
| 2212 |
APC Easy UPS 1000VA Without Battery |
Delivard Store |
P |
0 |
| 2236 |
APC Smart-UPS C, Line Interactive, 1500VA, Tower |
Delivard Store |
P |
0 |
| 2214 |
APC Easy UPS, 1000VA Tower |
Delivard Store |
P |
0 |
| 2215 |
APC Easy UPS, 1200VA Tower |
Delivard Store |
P |
0 |
| 3597 |
بيلكين سيرج 18 واط، يو إس بي A إلى C |
Delivard Store |
P |
0 |
| 2213 |
APC Easy UPS 2000VA Without Battery |
Delivard Store |
P |
0 |
| 2217 |
APC Back-UPS, 2200VA Tower |
Delivard Store |
P |
0 |
| 2356 |
Xiaomi Mi Power Strip (3 outlet, 3USB ) |
Delivard Store |
P |
0 |
| 2241 |
APC Easy Rack PDU 230V, 16A, 8 x C13 outlets |
Delivard Store |
P |
0 |
| 2234 |
APC Easy UPS On-Line, 2000VA/1800W, Rackmount 2U |
Delivard Store |
P |
0 |
| 2203 |
بطارية ماكسما UPS بسعة 7 أمبير ساعة |
Delivard Store |
P |
0 |
| 3932 |
حماية باور ستريب Huntkey SSZ501 – قابس المملكة المتحدة، 5 منافذ، سلك بطول 3 أمتار، أقصى حمل 2500 واط، مقاوم للحريق، مزود بشبابيك أمان للأطفال، مفتاح مزدوج للفصل، مقابس عالمية |
Delivard Store |
P |
0 |
| 2138 |
Maxma UPS Online 3KV |
Delivard Store |
P |
0 |
| 2205 |
بطارية ماكسما UPS بسعة 12 أمبير ساعة |
Delivard Store |
P |
0 |
| 2135 |
Maxma Smart UPS 2KVA |
Delivard Store |
P |
0 |