[PyGreSQL] Incomplete COPY from file

Daryl Tester Daryl.Tester at iocane.com.au
Thu Jan 25 15:38:22 EST 2007


Marina Olhovsky wrote:

> Also, in my script I'm often running into problems of slow execution
> and space overflow.

As Christoph said, this may be dependant on the version of Potsgresql
you're running, and this is probably falling more into the area of
database tuning than Pygresql.

> The reason I'm using COPY for heavy loads in that INSERT is incredibly
> slow

INSERTS outside of transactions are typically wrapped in individual
transactions, which impacts performance.  Bulk loading data usually
requires different strategies as well.  If I'm bulk loading using
inserts, then I'll batch 50 or so INSERTs within a transaction
(batching the entire lot, especially when it's a large number of
INSERTs impacts performance elsewhere).

> (I'm not using indexes on my tables),

I'm not sure if this was a statement of fact - lack of indexes would
make the INSERTs quicker.


-- 
Regards,
  Daryl Tester, IOCANE Pty. Ltd.


More information about the PyGreSQL mailing list