-
merge/copy partitioned tables efficiency
Hello all,
Currently, I would need to merge/copy partitioned tables from several individual folders to a common large folder:
kdbfolder_1 - <date> - trade - col_1,...,col_n ... kdbfolder_n - <date> - trade - col_1,...,col_n --> kdbcommon - <date> - trade - col_1,...,col_n
The columns of all individual tables are the same, and I did the merging by q codes, in which, for each individual folder, read the individual table data, and then “upsert” the data to the final common folder:
q) t:select from `:kdbfolder_n/<date>/trade; q) `:kdbcommon/<date>/trade/ upsert t;
This works properly, but the speed seems to be slow when running “upsert”, especially, when the table size in the common folder grows very large.
I would like to ask if there is a more efficient way to perform the merging/copying of the data?
Log in to reply.