MySQL Forums
Forum List  »  Performance

Re: Reduce the Query Execution Time Between MYSQL & VC++
Posted by: Rick James
Date: November 17, 2014 08:06PM

Mystery.

Same code run on both machines, I assume.

I assume the disk is local to the machine, not NFS mounted or SAN or WAN or FTP.

There is only one block in the table, so even if there were something radically different about the I/O subsystem and drives, the first read might be slow, but the rest would be fast.

24ms is too slow even for the typical disks in existence today. 10ms is an easy to remember Rule of Thumb.

Aha -- here's an interesting clue:
27 rows in set (0.02 sec)
That is 20ms when using the mysql commandline utility. That's reasonable. (Actually, there is some noise in that number; running it again might get 0.01 or some other _small_ value.)

That clue makes me point at VC++, the ODBC driver, and anything that your code has to use that could be different from (1) mysql commandline, and (2) the other machine.

Also check for swapping. That is a performance killer; I could imagine it could explain this much sluggishness.

Options: ReplyQuote




Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.