Query time 0.01792
JSON explain
{
"query_block": {
"select_id": 1,
"cost_info": {
"query_cost": "487.05"
},
"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": "q_categories",
"access_type": "range",
"possible_keys": [
"PRIMARY",
"c_status",
"p_category_id"
],
"key": "p_category_id",
"used_key_parts": [
"category_id"
],
"key_length": "3",
"rows_examined_per_scan": 26,
"rows_produced_per_join": 5,
"filtered": "20.00",
"using_index": true,
"cost_info": {
"read_cost": "35.37",
"eval_cost": "1.04",
"prefix_cost": "36.41",
"data_read_per_join": "13K"
},
"used_columns": [
"category_id",
"usergroup_ids",
"status"
],
"attached_condition": "((`portal`.`q_categories`.`category_id` in (190,543,551,191,418,192,419,193,194,195,196,197,198,199,200,201,202,203,204,206,386,420,424,428,429,556)) and ((`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_categories",
"access_type": "ref",
"possible_keys": [
"PRIMARY",
"pt"
],
"key": "PRIMARY",
"used_key_parts": [
"category_id"
],
"key_length": "3",
"ref": [
"portal.q_categories.category_id"
],
"rows_examined_per_scan": 156,
"rows_produced_per_join": 811,
"filtered": "100.00",
"using_index": true,
"cost_info": {
"read_cost": "25.43",
"eval_cost": "162.24",
"prefix_cost": "224.08",
"data_read_per_join": "12K"
},
"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": [
"portal.products_categories.product_id"
],
"rows_examined_per_scan": 1,
"rows_produced_per_join": 71,
"filtered": "8.87",
"cost_info": {
"read_cost": "0.00",
"eval_cost": "14.39",
"prefix_cost": "386.32",
"data_read_per_join": "424K"
},
"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": 71,
"filtered": "100.00",
"cost_info": {
"read_cost": "0.00",
"eval_cost": "14.39",
"prefix_cost": "400.71",
"data_read_per_join": "274K"
},
"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": 71,
"filtered": "99.95",
"using_index": true,
"cost_info": {
"read_cost": "71.95",
"eval_cost": "14.38",
"prefix_cost": "487.05",
"data_read_per_join": "1K"
},
"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 |
30355 |
IPhone 7 Wallet Case, Premium Protective Leather Zip Wallet Case Cover |
J D F General Trading LLC |
P |
0 |
30359 |
12in Mobile Phone Screen Magnifier 3D Hd Video Amplifier Smartphone Stand |
J D F General Trading LLC |
P |
0 |
30387 |
For Lenovo Tab 4 10 Tb-X304 F / Tb-X304 N - Coverking Tablet 10.1 Inch Case Cover - Black |
J D F General Trading LLC |
P |
0 |
30392 |
Universal Car Gps Hud Head up Display Support for Android and IOS |
J D F General Trading LLC |
P |
0 |
30393 |
360 Degree Rotating Ipad Air 2 Case Stand Case with Smart Cover Auto Sleep, Wake Feature Black |
J D F General Trading LLC |
P |
0 |
30399 |
Portable Magnetic Finger Charger Power Bank 5000 Mah Charging Station & 4 Charging Packs (each 1000 mAh) |
J D F General Trading LLC |
P |
0 |
30401 |
Lightning Hdtv Cable Apple Iphone X 8 Plus 2 M Lightning to Hdmi Av Tv Cable Adapter 1080 P for Apple Iphone 7 6 6 S Plus 5 S Ipad Air Ipad Mobile |
J D F General Trading LLC |
P |
0 |
30402 |
For Garmin Fenix 3 Hr Watch - Regentech Usb Charger Charging Dock |
J D F General Trading LLC |
P |
0 |
30403 |
For Samsung S3 Frontier / S3 Frontier Lte Smart Watch - Wireless Power Charging Charger Dock |
J D F General Trading LLC |
P |
0 |
30406 |
Broad Link Rm Mini 3-Black |
J D F General Trading LLC |
P |
0 |
30407 |
2 M Fs-An01 Android Endoscope - 2 M Black |
J D F General Trading LLC |
P |
0 |
30668 |
Black Gear S3 Frontier Case Cover for Samsung Galaxy Watch 46 Mm Band Soft Tpu Plated All-Around Protective Cases Shell Frame |
J D F General Trading LLC |
P |
0 |
30671 |
I10 Tws in Ear Air Pod for Iphone and Samsung Mobiles Bluetooth Wireless Ear Buds Auto Pairing |
J D F General Trading LLC |
P |
0 |
30672 |
2 Pcs Screen Protector Film for Samsung Galaxy Watch 46 Mm Smart Wacth Accessories Anti-Shock Tempered Glass Protective |
J D F General Trading LLC |
P |
0 |
30675 |
2 Pcs Tempered Glass Screen Protector for Huawei Watch2 Smart Watch Film Guard |
J D F General Trading LLC |
P |
0 |
30676 |
iPhone 7 Lightning to Hdmi Adapter, Stouch Lightning Digital Av Adapter for Iphone 7/7 Plus, Iphone 6 and Ipad Pro Models |
J D F General Trading LLC |
P |
0 |
30682 |
Metal Dust Guard for Apple Airpods Case Shell Skin |
J D F General Trading LLC |
P |
0 |
30686 |
I11 Ifans Tws Air Pods 1-1 Wireless Bluetooth 5.0 Super Bass Earbud Pk I10 I12 I13 Tws for Ear Pod |
J D F General Trading LLC |
P |
0 |
30694 |
Vipeco Universal Car Dashboard Holder Stand Bracket Mount for Mobile Cell Phone 120.00 * 110.00 * 80.00 Mm |
J D F General Trading LLC |
P |
0 |
30695 |
ISKIL i12 TWS Bluetooth 5.0 Earphone True Wireless Sports Touch Earbuds Sweatproof headset 3D Stereo Air pod (White) |
J D F General Trading LLC |
P |
0 |
30699 |
Leather Case for Huawei Mediapad T5 10 Inch Tablet Stand Smart Cover Auto Sleep Wake Blue |
J D F General Trading LLC |
P |
0 |
30701 |
Slim Magnetic Pu Leather Case for Lenovo Tab M10 Tb-X605 F Tb X605 Tablet Cover for Lenovo Tab M10 |
J D F General Trading LLC |
P |
0 |
30702 |
Sport Hifi In-Ear Wireless Cord-Free Headphone for Samsung Gear Iconx Sm-R150 Bluetooth Headset |
J D F General Trading LLC |
P |
0 |
30704 |
Fitbit Versa Protector Case Cover Full Frame Screen Protector Soft Slim Tpu Shell Case Flexible Anti-Scratch Bumper Cover Black |
J D F General Trading LLC |
P |
0 |
30705 |
Pgytech Dji Osmo Pocket Foldable Phone Holder Plus Bracket Set of Dji Osmo Pocket Mount Clip Adapter Accessories |
J D F General Trading LLC |
P |
0 |
30707 |
For Lenovo Tab M10 Case 10.1 Inch Tb-X605 F Tb-X605 L Slim Pu Leather Magnetic Shockproof Hard Cover |
J D F General Trading LLC |
P |
0 |
30708 |
Soft Silicone Shockproof Cover with Carabiner for Huawei Honor Flypods/flypods Pro Earphone Protector Case |
J D F General Trading LLC |
P |
0 |
30711 |
Black Leather Case for Huawei Mediapad M5 Lite 10 Inch Tablet Stand Smart Cover Auto Sleep Wake |
J D F General Trading LLC |
P |
0 |
30712 |
For Huawei Flypods Case Leather Cases for Huavei Aipods Wireless Bluetooth Earphone Cover for Honor Airpods Fly Pod |
J D F General Trading LLC |
P |
0 |
30713 |
Films Dust Guard for Apple Airpods 2 Pieces 18 K Gold Plating Protect Airpods from Iron Metal Shavings |
J D F General Trading LLC |
P |
0 |