From: Scott Marlowe <scott.marlowe@gmail.com>
To: Matthew Wakeling <matthew@flymine.org>
Cc: pgsql-performance@postgresql.org
Subject: Re: Large number of tables slow insert
Date: Tue, 26 Aug 2008 09:29:15 -0600
Message-ID: <dcc563d10808260829s6d397b7egd364589c9c5b16b1@mail.gmail.com> (raw)
In-Reply-To: <alpine.DEB.1.10.0808261348190.4454@aragorn.flymine.org>
References: <1775c5ea0808221841u746862e3h1b721ea82fdb7794@mail.gmail.com>
<alpine.DEB.1.10.0808261348190.4454@aragorn.flymine.org>
On Tue, Aug 26, 2008 at 6:50 AM, Matthew Wakeling <matthew@flymine.org> wrote:
> On Sat, 23 Aug 2008, Loic Petit wrote:
>>
>> I use Postgresql 8.3.1-1 to store a lot of data coming from a large amount
>> of sensors. In order to have good
>> performances on querying by timestamp on each sensor, I partitionned my
>> measures table for each sensor. Thus I create
>> a lot of tables.
>
> As far as I can see, you are having performance problems as a direct result
> of this design decision, so it may be wise to reconsider. If you have an
> index on both the sensor identifier and the timestamp, it should perform
> reasonably well. It would scale a lot better with thousands of sensors too.
Properly partitioned, I'd expect one big table to outperform 3,000
sparsely populated tables.
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-performance@postgresql.org
Cc: scott.marlowe@gmail.com, matthew@flymine.org
Subject: Re: Large number of tables slow insert
In-Reply-To: <dcc563d10808260829s6d397b7egd364589c9c5b16b1@mail.gmail.com>
References: <1775c5ea0808221841u746862e3h1b721ea82fdb7794@mail.gmail.com> <alpine.DEB.1.10.0808261348190.4454@aragorn.flymine.org> <dcc563d10808260829s6d397b7egd364589c9c5b16b1@mail.gmail.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox