• Welcome to TechPowerUp Forums, Guest! Please check out our forum guidelines for info related to our community.

Slow update Query.. (PHP/MySql)

Joined
Dec 1, 2007
Messages
528 (0.09/day)
Location
Karachi, Pakistan
System Name mAkS
Processor Intel Core 2 Duo E0 E8400 @3.0Ghz (Acheived 4.4Ghz On Stock Cooling)
Motherboard Asus P5K-V (Dead :[ )
Cooling CPU + Front + Rear + Side
Memory XMS2 DHX TWIN2X2048-6400C5DHX/800 BUS
Video Card(s) Inno3D 9600 GT Overclocked
Storage Seagate Sata II 250 GB ++ 500 GB
Display(s) Hp 2009f 20-inch Wide-screen
Case Legend
Audio Device(s) Build-In 8 CHannel (Dell 5.1")
Power Supply CoolerMaster 460W eXtreme Power Plus
Software Many
Benchmark Scores E8400 hardware rank 94th on hwbot in wPrime :D
Hello,

I am using PHP/MySql, I am updating a table having about 2000 records, I am updating using the index key and just update one column.. its taking about 0.03-0.09 secs, I feel like its slow.. as I have other similar update queries on the page so it could a big time..

the Select query on the other hand takes only 0.0006-0.001 secs
 

W1zzard

Administrator
Staff member
Joined
May 14, 2004
Messages
26,956 (3.71/day)
Processor Ryzen 7 5700X
Memory 48 GB
Video Card(s) RTX 4080
Storage 2x HDD RAID 1, 3x M.2 NVMe
Display(s) 30" 2560x1600 + 19" 1280x1024
Software Windows 10 64-bit
show your statement
 
Joined
Dec 1, 2007
Messages
528 (0.09/day)
Location
Karachi, Pakistan
System Name mAkS
Processor Intel Core 2 Duo E0 E8400 @3.0Ghz (Acheived 4.4Ghz On Stock Cooling)
Motherboard Asus P5K-V (Dead :[ )
Cooling CPU + Front + Rear + Side
Memory XMS2 DHX TWIN2X2048-6400C5DHX/800 BUS
Video Card(s) Inno3D 9600 GT Overclocked
Storage Seagate Sata II 250 GB ++ 500 GB
Display(s) Hp 2009f 20-inch Wide-screen
Case Legend
Audio Device(s) Build-In 8 CHannel (Dell 5.1")
Power Supply CoolerMaster 460W eXtreme Power Plus
Software Many
Benchmark Scores E8400 hardware rank 94th on hwbot in wPrime :D
Update tbllikes set views=2000 where id=1700
 

W1zzard

Administrator
Staff member
Joined
May 14, 2004
Messages
26,956 (3.71/day)
Processor Ryzen 7 5700X
Memory 48 GB
Video Card(s) RTX 4080
Storage 2x HDD RAID 1, 3x M.2 NVMe
Display(s) 30" 2560x1600 + 19" 1280x1024
Software Windows 10 64-bit
if you have a key on id then there is nothing else you can optimize from a query perspective.

could you look into your mysql server variables like buffers etc
 
Top