Subject | Re: [firebird-support] Multiple dynamic sql statements supported? |
---|---|
Author | Paul Vinkenoog |
Post date | 2011-01-17T22:15:48Z |
Milan wrote:
statements are the same, only with different parameters, e.g.:
insert into MyTable (a, b, c) values (3, 4, 5);
insert into MyTable (a, b, c) values (8, 9, 9);
insert into MyTable (a, b, c) values (-3, 0, 6);
I'd rather prepare it as a parameterised statement and execute it as many
times as needed, filling in the values before each execution. A lot more
efficient, methinks, and probably also quicker.
Paul Vinkenoog
> Beside limit of size of SQL statement there's also the limit of compiledWhich brings me to another aspect of the original question. If many of the
> SQL statement in BLR form. In cases like this I usually group about 100
> inserts in single EXECUTE BLOCK and then run those in batches.
statements are the same, only with different parameters, e.g.:
insert into MyTable (a, b, c) values (3, 4, 5);
insert into MyTable (a, b, c) values (8, 9, 9);
insert into MyTable (a, b, c) values (-3, 0, 6);
I'd rather prepare it as a parameterised statement and execute it as many
times as needed, filling in the values before each execution. A lot more
efficient, methinks, and probably also quicker.
Paul Vinkenoog