I have an application that did many inserts also.  Only I was running
on a much lower powered machine and could get nowhere nere your 100
per minute rate.  What I did has re-write the application to batch the
inserts and then use COPY.  COPY it turns out is _much_ faster than
INSERT maybe by an order of magnitude.  Locking is harder but not by
much.  Also, have you turned off fsyncs?  This helps a lot.  Doing the
above will allow you to add thousands of rows per minute.


Brian Baquiran wrote:
> 
> Hi,
> 
> I'm using Postgres 6.5.2 in a high-volume application that has on the order of a
> hundred inserts and selects (but mostly inserts) a minute. My loadaverage hovers
> around 1.0, and can go much, much higher (50-80) during vacuum and queries on
> fairly large tables (1M rows). This is on a 4-CPU Intel Xeon Linux machine with
> 1GB of memory. Is this load typical? How can I tune Postgres and my application
> to better handle the load?
> 
> I'm running postmaster with the options -B600 -N300. I'm using the RedHat RPMs
> from a pretty-much-stock RH6.1 installation. Can I tune postgres to load more
> data into memory?
> 
> Brian
> --
> [EMAIL PROTECTED]
> http://www.baquiran.com
> US Fax: (603) 908-0727
> AIM: bbaquiran

-- 
  Chris Albertson

  [EMAIL PROTECTED]                  Voice: 626-351-0089  X127
  Logicon, Pasadena California            Fax:   626-351-0699

Reply via email to