Subject | Re: [firebird-support] insert speeds are slow |
---|---|
Author | Milan Babuskov |
Post date | 2005-06-21T22:47:07Z |
Luc Belliveau wrote:
this is the problem. Use prepared statements: in PHP via ibase_prepare
and ibase_execute functions. I don't know what is the machine you're
using, but 100.000 rows should load below one minute on most systems. I
just tried with one table (via FBExport) and it inserted 282651 rows in
119 seconds. That table has 9 fields (chars, numerics and timestamp).
Also, you may want to check if you have some complex triggers on that
table which could slow this down significantly.
--
Milan Babuskov
http://fbexport.sourceforge.net
http://www.flamerobin.org
> I'm trying to a table with 3 columns, all PFKsWhat is a PFK?
>, with 102117 rows. FirstYou could deactivate indexes and primary/foreign keys, but I'm not sure
> 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
this is the problem. Use prepared statements: in PHP via ibase_prepare
and ibase_execute functions. I don't know what is the machine you're
using, but 100.000 rows should load below one minute on most systems. I
just tried with one table (via FBExport) and it inserted 282651 rows in
119 seconds. That table has 9 fields (chars, numerics and timestamp).
Also, you may want to check if you have some complex triggers on that
table which could slow this down significantly.
--
Milan Babuskov
http://fbexport.sourceforge.net
http://www.flamerobin.org