Subject RE: [firebird-support] Batch insert performance
Author Rick Debay
I wouldn't bother committing at certain points, unless that makes sense
from a data consistency point of view.
For large amounts of data where Firebird is eventually going to stop
tracking it through its redo log (I'm using the wrong term there) you
can instruct Firebird to not maintain such a log.

-----Original Message-----
From: firebird-support@yahoogroups.com
[mailto:firebird-support@yahoogroups.com] On Behalf Of Richard Wesley
Sent: Wednesday, August 23, 2006 6:50 PM
To: firebird-support@yahoogroups.com
Subject: Re: [firebird-support] Batch insert performance

Hi Sean -

On Aug 23, 2006, at 14:19, Leyne, Sean wrote:

>> I am getting about 1e6 rows/hr
>
> That works out to 277 rows per second.
>
> That not terrible, but I have seen better.
>
>
> Are there any triggers firing for the inserts?

Nope.

> How big is an average row? How many fields?

In the customer example I have there are about 75 fields, about 1/4 of
which are varchar with a total width of about 225. The rest is a mix of
various wide numeric types (mostly bigint, a few double precision and
timestamp).

The actual layout of the data is not so important as I am looking for a
general solution - not just one for this customer. We have Firebird
embedded in our product for use as a local SQL OLAP engine and our
typical usage scenario is to take a sample of a user's completely
arbitrary database and load it into a local FB database for off-line
analysis.

>> Would
>> batching the inserts improve things?
>
> How often are you committing the rows?

Only at the end. I was wondering if updating the frequency would
improve things. TFB mentions batching in the range 5-20k rows when
you can't avoid indexing and I was wondering if there were other
cases where this would apply?

TIA
________________________________________________________
Richard Wesley Software Engineer
Tableau Software
http://www.tableausoftware.com/ hawkfish
tableausoftware com





++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Visit http://www.firebirdsql.org and click the Resources item
on the main (top) menu. Try Knowledgebase and FAQ links !

Also search the knowledgebases at http://www.ibphoenix.com

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Yahoo! Groups Links