Subject Re: [firebird-support] Doubt in Firebird
Author lionel napoleon
Thanks Helen for your reply was helpful


On Thursday, May 19, 2016 4:13 AM, "Helen Borrie helebor@... [firebird-support]" <firebird-support@yahoogroups.com> wrote:


 
Hello lionel,

Thursday, May 19, 2016, 12:50:44 AM, you wrote:

> I use firebird 2.5.6.I just wanted to know if there is a method by which i can speed
> an insert query to (insert about 50000 records) into a table.Right now it is taking about
> 40 minutes.My front end is VBscript and i use a prepared statement.Any help would be
> appreciated.

A likely cause of, or contributor to, that slow performance is some
default setting in the VB driver or the ODBC driver that is forcing
auto-commit on every iteration of the INSERT statement. It is typical
of these "dumbed-down" interfaces that try to make all database
engines work to the rules of the lowest common denominator, like
Access, for example, which don't use transactions. If you find that is
the case, try to code or configure it to enclose batches of approx.
10000 inserts in one transaction.

There are separate lists for the VB driver and the ODBC driver, which
you can find in the support section of the Fb web site. If
you get stuck, you may find someone on one of those lists who has
figured out how to make this happen using the same tool set.

On the Firebird side, if the table you are inserting to has a large
number of indexes, that will slow down your bulk inserts. If this
operation is just done occasionally, you might consider setting the
indexes inactive for the duration of the run. You can write simple
DDL scripts to deactivate and reactivate indexes.

Helen