On Apr 26, Oleg Broytmann <[EMAIL PROTECTED]> wrote:
> But Postgres doesn't support inserting many rows from a single SELECT
That's true, even if I've seen that dumps from PostgreSQL databases
contain commands used to insert many rows with the format:
COPY table_name (id, col1, col2, ...) FROM stdin;
1 val1a val2a ...
2 val1b val2b ...
... list of TAB-separated rows ...
\.
Anyway, let's assume that it's not feasible (after all even the
executemany() method of the psycopg2 module seems to call
the execute() method for every single row); my problem is slightly
different: it's ok to me to have a "very slow but working" support
for PostgreSQL/otherDatabases, but at the same time I can't (well:
I don't want :-) ignore that other databases (MySQL, for instance)
have _really faster_ executemany() methods - 4 or 5 times faster,
if I've measured correctly.
Given the amount of data to be processes, the difference between
3 and 12 hours to complete is quite noticeable. :-)
It seems that there are no other ways, besides the extraction
of a cursor, to directly use the executemany() method - and deal
with inconsistent parameter styles. :-/
PS: only to satisfy my curiosity: the fact that the
connection = connectionForURI('postrges://...')
connection.sqlrepr(sqlbuilder.Insert(..., valueList=[{...}, {...}]))
commands return a SQL statement that is not valid for a
PostgreSQL database is a bug or I have misunderstood its usage?
Thanks for your reply!
--
Davide Alberani <[EMAIL PROTECTED]> [PGP KeyID: 0x465BFD47]
http://erlug.linux.it/~da/
-------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
sqlobject-discuss mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/sqlobject-discuss