|Subject:||Re: Best way to Add from Paradox Table to AWS Postgres Table
|Date:||Fri, 10 Jul 2020 11:21:18 +1000
|From:||Robert MacMillan <email@example.com>
After some trial and error I think I have a very good answer for this.
So my code now creates a .csv
A batch file then uses the psql \copy command [thanks Mark for clearing
my confusion] to do the upload from my local hard drive to AWS including
passing the Password.
For all intents and purposes almost instant so orders of magnitude faster.
There are some little things involved to be careful of including date
formats which Paradox/BDE translate in "Adds" and the format of the psql
command line has to be perfect. Other than that extremely fast and easy
to do. The next bit to try is do it directly with no batch file but that
is for another day.
On 10/05/2020 5:38 PM, Robert MacMillan wrote:
> So adding works just fine using a standard add. Just like in Liz's
> question from years ago. It is pretty slow though so I am rapidly going
> to run into performance problems.
> I am wondering whether a scan reading each record into a dynamic array
> then inserting a blank record at the other end and then copyfromarray
> will work better and faster?
> Also if one uses this method does it also mean that as long as the field
> names are identical then the order of fields in the two tables can be
> And supplementary question. Does that also mean that as long as every
> field is in the AWS table then that table could contain additional
> fields that the rows will fill in correctly and fields that are not in
> the Paradox Table but are in the AWS Table will be left blank? I presume
> if the AWS Postgresql Table has fields that are not allowed to be null
> that it wont work?