Subject | insert speeds are slow |
---|---|
Author | Luc Belliveau |
Post date | 2005-06-21T18:49:28Z |
I'm trying to a table with 3 columns, all PFKs, with 102117 rows. First
I tried getting a stored procedure to do it, but found it was way too
slow. I assumed the problem was with the way I was collecting the
information to add (which involves some recursion), so I wrote a php
script to collect the information, that takes about 9 seconds, then
tried to do inserts from there. That was also much too slow, the server
the script was running on is on the same switch as the server, both a 1
gig, both linux servers.
So, I tried generating a .sql file from the php script, copied that over
the to database server itself, and ran isql -i myfile.sql, it took about
30 minutes to run. The statement itself looks something like this:
insert into bla (col1, col2, col3) values (1,2,3);
Anybody have ideas on how I could speed this up?
Thanks,
Luc
I tried getting a stored procedure to do it, but found it was way too
slow. I assumed the problem was with the way I was collecting the
information to add (which involves some recursion), so I wrote a php
script to collect the information, that takes about 9 seconds, then
tried to do inserts from there. That was also much too slow, the server
the script was running on is on the same switch as the server, both a 1
gig, both linux servers.
So, I tried generating a .sql file from the php script, copied that over
the to database server itself, and ran isql -i myfile.sql, it took about
30 minutes to run. The statement itself looks something like this:
insert into bla (col1, col2, col3) values (1,2,3);
Anybody have ideas on how I could speed this up?
Thanks,
Luc