Re: Getting even more insert performance (250m+rows/day) - Mailing list pgsql-performance

From Mark Lewis
Subject Re: Getting even more insert performance (250m+rows/day)
Date
Msg-id 1148501913.28095.70.camel@archimedes
Whole thread Raw
In response to Re: Getting even more insert performance (250m+rows/day)  ("Daniel J. Luke" <dluke@geeklair.net>)
List pgsql-performance
> The data gets inserted in batches every 5 minutes and I potentially
> have people querying it constantly, so I can't remove and re-create
> the index.

How live does your data need to be?  One possibility would be to use a
separate table for each batch instead of a separate table per day,
create the indexes after the import and only after the indexes have been
created make the table available for user queries.

You'd be trading latency for throughput in that case.

Also, you mentioned that you're CPU-bound, but that you have multiple
CPU's.  In that case, performing N concurrent imports (where N is the
number of processor cores available) might be a win over a single-
threaded import.

-- Mark Lewis

pgsql-performance by date:

Previous
From: "Steinar H. Gunderson"
Date:
Subject: Re: Getting even more insert performance (250m+rows/day)
Next
From: "Daniel J. Luke"
Date:
Subject: Re: Getting even more insert performance (250m+rows/day)