Tom's Guide | Tom's Hardware | Tom's Games
![]() |
![]() |
![]() |
Hi All,
I have a FreeBSD production server and
a Linux-box, which we use for development
and as our ftp server at the same time.Both machines host the same version of mySql: 3.23
I developed a simple C-program, which parses
ascii-files, which we receive daily
through ftp on our Linux machine from our
business partner and inserts new
records into a table (47 fields per record).My manager want to run this program from Linux only !
When I run the program against our development mySql database on this same Linux machine, it processes
200 records in 3-5 seconds.However when I run the same program (on Linux)
against our production database, it takes 7-10 minutes
to process the same number of records.The tables & indexes are identical in both development and
production databases. The workload of the FreeBSD machine
is less than moderate (it can be deemed as idle).ANY IDEA WHAT COULD CONTRIBUTE TO SUCH
DRASTIC PERFORMANCE DROP ?Thank you very much in advance !
... and this is now becoming urgent :(
Henry Monster.

There are likely network resolutions issues at hand. 200 records in 3 seconds. That's OK. Are other network protocols as slow - rlogin, rcp ? You might add an entry in the server's /etc/host file to eliminate calls to a dns server.
Also the load data infile syntax is about 20 times faster than a series of sql insert commands.

David,
Thank you for your response!
I'll check what you suggest.
What surprises me is that I run all my
INSERT statements through the same
connection to mySql database and
I open this connection just once
when the program starts. I assumed that
mySql C-client resolves
the database server name once when it
establishes the connection and then saves
the IP address in a memory structure
as long as the connection is open.Henry M.

![]() |
![]() |
![]() |

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.
| Ads by Google |