Обсуждение: Using COPY in the migration wizard.
The migration wizard is very slow because it does an insert of all the records. Would it be possible to use COPY instead? What I can do in psql in less than a second takes 10 minutes or more using the wizard. That is just for one of the smallest tables. For the whole database it's probably going to take days at this rate. Is there a reason this isn't currently done? Kurt
> -----Original Message----- > From: Kurt Roeckx [mailto:Q@ping.be] > Sent: 11 December 2002 22:12 > To: pgadmin-hackers@postgresql.org > Subject: [pgadmin-hackers] Using COPY in the migration wizard. > > > The migration wizard is very slow because it does an insert > of all the records. Would it be possible to use COPY instead? No because there is no interface for copy in the ODBC spec. > What I can do in psql in less than a second takes 10 minutes > or more using the wizard. That is just for one of the > smallest tables. For the whole database it's probably going > to take days at this rate. Make sure you have logging turned off under Tools -> Options, and that SQL tracing is switched of in the ODBC driver manager. To be honest though, if you can get your data in a format for copy, then I would suggest migrating the empty tables only using pgAdmin, then loading them using psql. Regards, Dave.
On Wed, Dec 11, 2002 at 10:19:22PM -0000, Dave Page wrote: > > > > The migration wizard is very slow because it does an insert > > of all the records. Would it be possible to use COPY instead? > > No because there is no interface for copy in the ODBC spec. Don't you directly access postgresql, without odbc? It's only the postgresql part that has to use COPY, not when reading the data. Kurt
> -----Original Message----- > From: Kurt Roeckx [mailto:Q@ping.be] > Sent: 11 December 2002 22:25 > To: Dave Page > Cc: pgadmin-hackers@postgresql.org > Subject: Re: [pgadmin-hackers] Using COPY in the migration wizard. > > > On Wed, Dec 11, 2002 at 10:19:22PM -0000, Dave Page wrote: > > > > > > The migration wizard is very slow because it does an insert > > > of all the records. Would it be possible to use COPY instead? > > > > No because there is no interface for copy in the ODBC spec. > > Don't you directly access postgresql, without odbc? It's > only the postgresql part that has to use COPY, not when > reading the data. Not in pgAdmin II, that uses ODBC/ADO. pgAdmin III which is in development uses libpq. Regards, Dave.