In db2wh,
One of our tasks is to look for candidate alternatives for INSERT FROM master SELECT * FROM staging
and dbload may be the one.
Comparing the elapsed time of INSERT and dbload from a same local CSV file, dbload is a little bit faster than INSERT but is nearly the same.
Question is: As internal implementation, is dbload same as INSERT? What is dbload advantage compared to INSERT OR which one is better to use for laoding data?
dbload
uses Db2 WarehouseEXTERNAL TABLE
s to get data into Db2.INSERT
s fromEXTERNAL TABLE
s are the same asINSERT
s fromSELECT
s in many respects. They use much of the same internal processing within Db2.Generally speaking, once you have got your data into the database (i.e. into Staging), you are better off leaving it in the database, rather than exporting it, then re-importing it again.
In short, stick to
INSERT FROM SELECT
.