Search Postgresql Archives

Re: COPY FROM STDIN instead of INSERT

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 10/18/06, Ilja Golshtein <ilejn@xxxxxxxxx> wrote:
I've tried to play with batches and with peculiar constructions
like INSERT (SELECT .. UNION ALL SELECT ..) to improve performance, but not satisfied with the result I've got.

postgresql 8.2 (beta) supports the 'multiple insert' syntax, so you
can insert multiple rows in an insert statement without using 'union
all'. it's pretty fast, although not as fast as copy.  btw, if you
have a lot of indexes on your table, the input method is not so
important.

aside: new insert syntax has one very nice side effect.  assuming the
table(s) are already defined, I can transfer data  from mysql to
postgresql via:

mysqldump --compatible=postgresql esilo | grep INSERT | psql

without any extra processing for most cases.  gotta give some points
to mysql for adding postgresql compatibility which sorta works.

merlin


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux