Re: Optimal database table optimization method - Mailing list pgsql-general

From John R Pierce
Subject Re: Optimal database table optimization method
Date
Msg-id 4B905851.4020200@hogranch.com
Whole thread Raw
In response to Re: Optimal database table optimization method  (Adrian von Bidder <avbidder@fortytwo.ch>)
List 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.





pgsql-general by date:

Previous
From: Mridula Mahadevan
Date:
Subject: Foreign key behavior different in a function and outside
Next
From: Thomas
Date:
Subject: need some advanced books on Postgres