Subject | Re: [firebird-support] Re: bulk insert |
---|---|
Author | Aage Johansen |
Post date | 2005-05-20T19:41:44Z |
Rick Debay wrote:
Even though parameters and responses go back and forth, you will save some
time by avoiding parsing & optimizing the query.
--
Aage J.
> Unfortunately, you still need to send the values one at a time and getI'm not sure I understand your points, but if I do:
> back each response.
> Sending a bunch of parameters at once and getting back one response
> isn't supported.
Even though parameters and responses go back and forth, you will save some
time by avoiding parsing & optimizing the query.
--
Aage J.
>
> -----Original Message-----
> From: firebird-support@yahoogroups.com
> [mailto:firebird-support@yahoogroups.com] On Behalf Of Aage Johansen
> Sent: Thursday, May 19, 2005 5:24 PM
> To: firebird-support@yahoogroups.com
> Subject: Re: [firebird-support] Re: bulk insert
>
> pwidf wrote:
>
> >> Using a parameterized, prepared insert statement should be fast - >
>
>> > maybe as fast using an "external table".
>
> >
> > mm, what do you by "parameterized, prepared insert statement"?
> > in the background this is for use in an adhoc query tool, so i am
> doing some stringbuilding to generate the insert statements >
>
> This depends somewhat on which component set you are using.
> You could build a string like
> insert into TBL (F1,F2) values (:P1,:P2) Then stuff this into a query
> component, and do a 'prepare'.
> Then for every record you want to insert, you set the parameters P1 and
> P2 to the actual values, and execute.
> The 'prepare' is done once, and thus the server don't have to parse and
> optimize the same insert statement for every record.
>
> --
> Aage J.