Query time 0.00544
JSON explain
{
"query_block": {
"select_id": 1,
"cost_info": {
"query_cost": "361.77"
},
"ordering_operation": {
"using_filesort": true,
"grouping_operation": {
"using_temporary_table": true,
"using_filesort": false,
"nested_loop": [
{
"table": {
"table_name": "inventory",
"access_type": "system",
"possible_keys": [
"pc"
],
"rows_examined_per_scan": 0,
"rows_produced_per_join": 1,
"filtered": "0.00",
"const_row_not_found": true,
"cost_info": {
"read_cost": "0.00",
"eval_cost": "0.20",
"prefix_cost": "0.00",
"data_read_per_join": "976"
},
"used_columns": [
"product_id",
"amount"
]
}
},
{
"table": {
"table_name": "companies",
"access_type": "const",
"possible_keys": [
"PRIMARY"
],
"key": "PRIMARY",
"used_key_parts": [
"company_id"
],
"key_length": "4",
"ref": [
"const"
],
"rows_examined_per_scan": 1,
"rows_produced_per_join": 1,
"filtered": "100.00",
"cost_info": {
"read_cost": "0.00",
"eval_cost": "0.20",
"prefix_cost": "0.00",
"data_read_per_join": "5K"
},
"used_columns": [
"company_id",
"status",
"company"
]
}
},
{
"table": {
"table_name": "products_categories",
"access_type": "range",
"possible_keys": [
"PRIMARY",
"pt"
],
"key": "PRIMARY",
"used_key_parts": [
"category_id"
],
"key_length": "3",
"rows_examined_per_scan": 523,
"rows_produced_per_join": 523,
"filtered": "100.00",
"using_index": true,
"cost_info": {
"read_cost": "118.66",
"eval_cost": "104.60",
"prefix_cost": "223.26",
"data_read_per_join": "8K"
},
"used_columns": [
"product_id",
"category_id"
],
"attached_condition": "(`portal`.`products_categories`.`category_id` in (168,169,170,171,172,173,174,175,176,177,179,180,181,182,183,188,244,481,518,521,522,529,531))"
}
},
{
"table": {
"table_name": "q_categories",
"access_type": "eq_ref",
"possible_keys": [
"PRIMARY",
"c_status",
"p_category_id"
],
"key": "PRIMARY",
"used_key_parts": [
"category_id"
],
"key_length": "3",
"ref": [
"portal.products_categories.category_id"
],
"rows_examined_per_scan": 1,
"rows_produced_per_join": 104,
"filtered": "20.00",
"cost_info": {
"read_cost": "0.00",
"eval_cost": "20.92",
"prefix_cost": "327.86",
"data_read_per_join": "276K"
},
"used_columns": [
"category_id",
"usergroup_ids",
"status"
],
"attached_condition": "(((`portal`.`q_categories`.`usergroup_ids` = '') or find_in_set(0,`portal`.`q_categories`.`usergroup_ids`) or find_in_set(1,`portal`.`q_categories`.`usergroup_ids`)) and (`portal`.`q_categories`.`status` in ('A','H')))"
}
},
{
"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": [
"portal.products_categories.product_id"
],
"rows_examined_per_scan": 1,
"rows_produced_per_join": 9,
"filtered": "8.87",
"cost_info": {
"read_cost": "0.00",
"eval_cost": "1.86",
"prefix_cost": "348.78",
"data_read_per_join": "54K"
},
"used_columns": [
"product_id",
"product_type",
"status",
"company_id",
"amount",
"timestamp",
"usergroup_ids",
"tracking",
"parent_product_id"
],
"attached_condition": "((`portal`.`products`.`parent_product_id` = 0) and (`portal`.`products`.`company_id` = 21) and (case `portal`.`products`.`tracking` when 'O' then <cache>((NULL > 0)) when 'B' then (`portal`.`products`.`amount` > 0) else 1 end) and ((`portal`.`products`.`usergroup_ids` = '') or find_in_set(0,`portal`.`products`.`usergroup_ids`) or find_in_set(1,`portal`.`products`.`usergroup_ids`)) and (`portal`.`products`.`status` = 'A'))"
}
},
{
"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": [
"portal.products_categories.product_id",
"const"
],
"rows_examined_per_scan": 1,
"rows_produced_per_join": 9,
"filtered": "100.00",
"cost_info": {
"read_cost": "0.00",
"eval_cost": "1.86",
"prefix_cost": "350.64",
"data_read_per_join": "35K"
},
"used_columns": [
"product_id",
"lang_code",
"product"
]
}
},
{
"table": {
"table_name": "prices",
"access_type": "ref",
"possible_keys": [
"usergroup",
"product_id",
"lower_limit",
"usergroup_id"
],
"key": "usergroup",
"used_key_parts": [
"product_id"
],
"key_length": "3",
"ref": [
"portal.products_categories.product_id"
],
"rows_examined_per_scan": 1,
"rows_produced_per_join": 9,
"filtered": "99.95",
"using_index": true,
"cost_info": {
"read_cost": "9.28",
"eval_cost": "1.85",
"prefix_cost": "361.77",
"data_read_per_join": "222"
},
"used_columns": [
"product_id",
"lower_limit",
"usergroup_id"
],
"attached_condition": "((`portal`.`prices`.`lower_limit` = 1) and (`portal`.`prices`.`usergroup_id` in (0,0,1)))"
}
}
]
}
}
}
}
Result
product_id |
product |
company_name |
product_type |
parent_product_id |
31047 |
Kitchen Water Sink Strainer Cover Floor Drain Plug Bath Catcher Drain Plug |
J D F General Trading LLC |
P |
0 |
31053 |
Multi-Function Salad Crusher Food Processor Manual Meat Machine Crusher Chopper |
J D F General Trading LLC |
P |
0 |
31068 |
8 X Reusable Silicone Food Storage Bags Set Zip Leakproof Container Stand Up Bag |
J D F General Trading LLC |
P |
0 |
31074 |
6Pcs Reusable Gas Range Stove Top Burner Protector Liner Cover For Cleaning |
J D F General Trading LLC |
P |
0 |
31082 |
Cake Decorating Turntable Rotating Revolving Icing Kitchen Display Stand 28 Cm |
J D F General Trading LLC |
P |
0 |
31089 |
Spiral Vegetable Fruit Slicer Cutter Grater Twister Peeler Kitchen Gadgets Tools |
J D F General Trading LLC |
P |
0 |
31091 |
Mini Heater Mini Heater Mini Electric Heater Electric Fan |
J D F General Trading LLC |
P |
0 |
31117 |
New Meat Meat Tenderizer Needle with Stainless Steel Kitchen Tools Bk |
J D F General Trading LLC |
P |
0 |
31129 |
Electric Mosquito Swatter Tennis Bat Racket Insect Fly Bug Wasp Swatter |
J D F General Trading LLC |
P |
0 |
31151 |
10Pcs Reusable Gas Range Stove Top Burner Protector Liner Cover For Cleaning |
J D F General Trading LLC |
P |
0 |
31155 |
Replacement Part For Irobot Roomba 600 610 620 650 Series Vacuum Cleaner |
J D F General Trading LLC |
P |
0 |
31156 |
Chicken Duck Holder Rack Grill Stand Roasting For Bbq Rib Non Stick Carbon Steel |
J D F General Trading LLC |
P |
0 |
10422 |
Xiaomi Mi Air Purifier 2S Sterilizer Addition To Formaldehyde Cleaning Intelligent HouseholdĀ |
J D F General Trading LLC |
P |
0 |
10429 |
Xiaomi Mijia Thermostatic Electric Kettle 1.5L Control By Mobile Phone App |
J D F General Trading LLC |
P |
0 |
10431 |
Xiaomi Mijia Electric Kettle 304 Stainless Steel 1.5L Dual Layer Kettle Water Bottle White |
J D F General Trading LLC |
P |
0 |
10432 |
Xiaomi IH Smart Electric Rice Cooker with Smartphone App WiFi Control White |
J D F General Trading LLC |
P |
0 |
10433 |
Xiaomi Mi Robot Vacuum Cleaner Part Pack 2 Units Hepa Filter Replacement |
J D F General Trading LLC |
P |
0 |
10027 |
Xiaomi Mi Air Purifier 2S Sterilizer Addition To Formaldehyde Cleaning Intelligent Household Hepa Filter Smart App Wifi Rc - Chinese Edition |
J D F General Trading LLC |
P |
0 |
10028 |
Xiaomi Mijia Roborock Vacuum Cleaner 2 Automatic Area Cleaning, 5200Mah Battery |
J D F General Trading LLC |
P |
0 |
4579 |
Xiaomi Mi Smart Robot Vacuum Cleaner With Laser Guidance System - White |
J D F General Trading LLC |
P |
0 |
4580 |
Roborock E2 Robot Vacuum Cleaner Sweeping And Mopping Robotic Vacuum With App Control |
J D F General Trading LLC |
P |
0 |
3352 |
Xiaomi Roborock S512 Robot Vacuum And Mop With Smart Navigation |
J D F General Trading LLC |
P |
0 |
3353 |
Xiaomi Roborock S5 Robot Vacuum And Mop, Smart Navigating Robotic Vacuum Cleaner |
J D F General Trading LLC |
P |
0 |