Subject | Re: [firebird-support] Bulk upload options |
---|---|
Author | |
Post date | 2018-05-16T16:28:28Z |
Well, let's think this through
When firebird executes the following command it does it extremelly quickly:
Insert into Table
Select * from Table
That probably is because the sentence insert into table expects multiple
results from the Select statement.
isql on the other hand will have to execute an insert per record, unless I
could say:
Insert into Table
Values (a,b,c)
+ (next record)
Values (a2,b2,c2)
+ etc
Is there a sentence in Firebird that would allow inserting multiple records
from a TXT file?
Perhaps defining an external file table, with the contents of what I want to
upload, and executing:
Insert into Target Table
Select * from External TXT File, and if the TXT file is on an SSD HDD one
would assume this would fly, right??
Cheers,
Fabian
When firebird executes the following command it does it extremelly quickly:
Insert into Table
Select * from Table
That probably is because the sentence insert into table expects multiple
results from the Select statement.
isql on the other hand will have to execute an insert per record, unless I
could say:
Insert into Table
Values (a,b,c)
+ (next record)
Values (a2,b2,c2)
+ etc
Is there a sentence in Firebird that would allow inserting multiple records
from a TXT file?
Perhaps defining an external file table, with the contents of what I want to
upload, and executing:
Insert into Target Table
Select * from External TXT File, and if the TXT file is on an SSD HDD one
would assume this would fly, right??
Cheers,
Fabian
----- Original Message -----
From: "Dimitry Sibiryakov sd@... [firebird-support]"
<firebird-support@yahoogroups.com>
To: <firebird-support@yahoogroups.com>
Sent: Wednesday, May 16, 2018 7:10 PM
Subject: Re: [firebird-support] Bulk upload options
> 16.05.2018 4:48, fabianch@... [firebird-support] wrote:
>> Does anyone have experience with bulk updates via isql? Would it be X
>> times faster than using a normal application inserting the records inside
>> a begin transaction and commit at the end?
>
> No, because it is exactly what isql does: execute a prepared statement
> for each line of
> data. No magic inside.
>
>> I think this solutions will do!!!!
>
> External tables has a definite limitations, for example you cannot put
> NULL into it. If
> it is ok for you - fine. Otherwise the fastest way is export data into a
> file on one side,
> compress, transfer to other side, uncompress and then parse the file and
> insert records
> one-by-one in a single transaction.
> Firebird 4 has some kind of batch interface, but I'm not sure if it can
> speed up bulk load.
>
> --
> WBR, SD.
>
>
> ------------------------------------
>
> ------------------------------------
>
> ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
>
> Visit http://www.firebirdsql.org and click the Documentation item
> on the main (top) menu. Try FAQ and other links from the left-side menu
> there.
>
> Also search the knowledgebases at
> http://www.ibphoenix.com/resources/documents/
>
> ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
> ------------------------------------
>
> Yahoo Groups Links
>
>
>