Subject | Re: [firebird-support] Inserting Rows into DB |
---|---|
Author | Svein Erling Tysvær |
Post date | 2006-05-16T14:30:15Z |
Using parametres rather than constants may help performancewise,
avoiding the need to prepare a statement for every execution. Add to
that the possibility of performing multiple inserts within one
transaction, and it may be possible to insert a few thousand records per
second (though I know nothing about Liberty or ODBC, I only use IBO myself).
By the way, you should start a new thread rather than replying to an old
one when you're questions isn't related to the original thread. The odds
are that if you reply to an old mail, those of us who use threading
don't see your mail if we were not interested in the original topic, and
in addition it muddles up our threading. Probably a bit similar to the
way using two columns can make reading more complicated for blind persons.
HTH,
Set
Martijn Tonies wrote:
avoiding the need to prepare a statement for every execution. Add to
that the possibility of performing multiple inserts within one
transaction, and it may be possible to insert a few thousand records per
second (though I know nothing about Liberty or ODBC, I only use IBO myself).
By the way, you should start a new thread rather than replying to an old
one when you're questions isn't related to the original thread. The odds
are that if you reply to an old mail, those of us who use threading
don't see your mail if we were not interested in the original topic, and
in addition it muddles up our threading. Probably a bit similar to the
way using two columns can make reading more complicated for blind persons.
HTH,
Set
Martijn Tonies wrote:
> Hello Rick,ready to
>
>> I have successfully created a Firebird Database, table and am now
>> insert some test data. I've read about the INSERT FROM syntax.or get
>
> Make that INSERT INTO ;-)
>
>> It appears that the examples insert one row at a time using the VALUES
>> clause. In my program I will read from a CSV or Random Access file
>> some data for several rows, perhaps 30 to 100 in some other way,then want
>> to insert these new rows into the FB database table. Is there somesyntax
>> to build multiple VALUES list entries and insert them with one execute
>> statement I can research further?
>
> No, there's currently no such thing, only 1 row can be inserted with a
> VALUES clause.
>
>> Or, do I have to loop through the logic to define the COLUMN VALUES for
>> each row and perform an EXECUTE for each row I want to insert?
>> I'm considering performance, of course.
>
> You have to "execute" for each new row.
>
> Martijn Bamsemums Tonies