Re: Optimal database table optimization method

From: John R Pierce <pierce(at)hogranch(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: Optimal database table optimization method
Date: 2010-03-05 01:03:13
Message-ID: 4B905851.4020200@hogranch.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general


> I have no idea how good pg is with select queries over 365 partitions (1
> year).

no need to use a partition per day, I'm pretty sure he won't mind having
a few extra days or weeks. I'd go by month, and drop a whole month at
a time, that way there's only 12-13 partitions.

and doing this, there's no need for a date index if he's never searching
by date, just an index on the primary key. yes, the selects will have
to search all 12-13 tables, but SELECT ... WHERE pk=?; are very fast
searches, so doing this on 12 tables is pretty painless.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Thomas 2010-03-05 01:27:39 need some advanced books on Postgres
Previous Message Mridula Mahadevan 2010-03-05 00:19:02 Foreign key behavior different in a function and outside