Search Postgresql Archives

Re: Insert statements really slow

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

 



On Fri, Nov 09, 2007 at 11:53:08AM -0600, Waller, David wrote:
> The data is web log data and each line has a variable amount of the
> fields (mostly because of cookies) so I am using a lot of insert
> statements.
>  
> In MySQL I go through a file in about 2 minutes and it is taking about
> 30 in PG.  I have removed all but the primary key index and have done a
> BEGIN and COMMIT after turning off AUTOCOMMIT.
>  
> What other things should I be looking at to spped this up?

It could be that your server is doing too much work because you don't have
enough WAL segments or something.

But I'd suggest looking at COPY for bulk imports.  It's way faster.

A

-- 
Andrew Sullivan
Old sigs will return after re-constitution of blue smoke

---------------------------(end of broadcast)---------------------------
TIP 9: In versions below 8.0, the planner will ignore your desire to
       choose an index scan if your joining column's datatypes do not
       match

[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