[PyGreSQL] Incomplete COPY from file

Marina Olhovsky olhovsky at mshri.on.ca
Thu Jan 25 11:45:37 EST 2007


Also, in my script I'm often running into problems of slow execution and space overflow.  The reason I'm using COPY for heavy loads in that INSERT is incredibly slow (I'm not using indexes on my tables), UPDATEs are quite slow as well.  I'm often getting "number of page slots needed exceeds max_fsm_pages" warnings on VACUUM.  I've tried using dictionaries to speed up execution, but did not get much improvement.  Any suggestions?  Thanks.

-----Original Message-----
From: pygresql-bounces at Vex.Net on behalf of Daryl Tester
Sent: Wed 1/24/2007 7:56 PM
To: PyGreSQL Development; pygresql at Vex.Net
Subject: Re: [PyGreSQL] Incomplete COPY from file
 
Marina Olhovsky wrote:

> for i in my_ids:
>   outfile.write(`i[0]` + '\n')

You should close, or at least flush the file before executing -

> q2 = "COPY tbl_2(new_id) FROM '" + fname + "'"
> db.query(q2)

Regards,
  Daryl Tester
 
_______________________________________________
PyGreSQL mailing list
PyGreSQL at Vex.Net
http://mailman.vex.net/mailman/listinfo/pygresql

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.vex.net/pipermail/pygresql/attachments/20070125/a45a2d76/attachment.html 


More information about the PyGreSQL mailing list