Bug #23863 MySQL 5.0.X Slow to import DB on Windows
Submitted: 1 Nov 2006 22:38 Modified: 28 Jan 2007 11:41
Reporter: Jared S (Silver Quality Contributor) Email Updates:
Status: Can't repeat Impact on me:
Category:MySQL Server Severity:S1 (Critical)
Version:5.0.27 OS:Windows (WinXP)
Assigned to: CPU Architecture:Any
Tags: database, import, script

[1 Nov 2006 22:38] Jared S

I have noticed a very distinct difference between installing a 1 Meg DB on LINUX and Windows.

Windows is extremeley slow at 5 times the speed of LINUX.

How to repeat:
> get 2 computers, 1 windows box, 1 linux box
> get a 1MG+ Databse
> insert datbase using your preferred method
> time the time it takes for both machines

Windows box takes 5 Times longer 

Suggested fix:
I suggest you debug performance to and research better string manipulation in the Win32 routines that are having slow impact on Windows box.
[2 Nov 2006 9:29] Valeriy Kravchuk
Thank you for a problem report. Are you sure you had the same settings in my.ini on Windows as in my.cnf on Linux? Can you send/upload a dump of a test database that demonstrates the behaviour you described?
[3 Nov 2006 0:27] Jared S
To my knowledge MySQL install onb Fedora 6 with NO my.cnf file so to answer previous question the CNF fille would be nothing on LINUX and the INI file on windows would be whatever the standard configuration wizard produces for standard configuration.
[3 Nov 2006 13:59] Valeriy Kravchuk
Please, send the results of:


from both Windows and Linux machine. You can upload them as private files.
[6 Nov 2006 21:57] Jared S
2 files showing variables of each server

Attachment: LinuxAndWinVars.zip (application/x-zip-compressed, text), 4.74 KiB.

[6 Nov 2006 22:00] Jared S

I have uploaded variable dump for the windows and linux box,  I notice quite a few differences in them.  Maybe as MySQL expert you could point out any that may be degrading performance on windows box.

All tables are InnoDB although variable on linux suggest other.

Jared Sullivan
[28 Nov 2006 17:51] Valeriy Kravchuk
Is it 64-bit Windows on AMD processor(s)? Please, also check in your disk Properties / Policies that write caching on the disk is enabled!
[28 Nov 2006 21:58] Jared S
-32bit WinXP with Intel stock P4
-Yes, disk cahing is enabled

What were your results..

How many seconds did these scripts take to run on your Linux and Win boxes?
[28 Jan 2007 11:41] Valeriy Kravchuk
Sorry for a delay with this bug report. With 5.0.36-BK on Linux (and no my.cnf) I've got, with your test case:

openxs@suse:~/dbs/5.0> time bin/mysql -uroot < /tmp/Gool.sql

real    0m3.214s
user    0m0.019s
sys     0m0.177s

While with 5.0.27 on different Windows boxes up to 20+ seconds were needed to load the same data...

But(!) when I installed 5.0.27 with default settings on Windows XP in virtual machine with the same settings as that used for Linux above, I've got similar speed, 3+ seconds. So, it really depends on disks subsystem speed mostly. With similar disk subsystem I've got similar speed.