Re: [GENERAL] hash partitioning

2008-09-03 Thread Ian Harding
On Wed, Sep 3, 2008 at 10:36 AM, William Garrison <[EMAIL PROTECTED]> wrote: > When I attended the PostgreSQL East conference, someone presented a way of > doing this that they used for http://www.mailermailer.com/ and they did > this: > > SET constraint_exclusion = on; > EXPLAIN > SELECT > * >

Re: [GENERAL] hash partitioning

2008-09-03 Thread William Garrison
When I attended the PostgreSQL East conference, someone presented a way of doing this that they used for http://www.mailermailer.com/ and they did this: SET constraint_exclusion = on; EXPLAIN SELECT * FROM test WHERE id = 7 AND id % 4 = 3 Their business layer then generated the "AN

Re: [GENERAL] hash partitioning

2008-09-03 Thread Tom Lane
"David West" <[EMAIL PROTECTED]> writes: > I'm wondering why the postgres planner is not capable of determining the > correct partition for a simple select for the following partitioning scheme, The planner doesn't know anything about the behavior of %. Heed the fine manual's advice: Keep the

Re: [GENERAL] hash partitioning

2008-09-03 Thread Scott Marlowe
On Wed, Sep 3, 2008 at 10:24 AM, David West <[EMAIL PROTECTED]> wrote: > Hi folks, > > > > I'm wondering why the postgres planner is not capable of determining the > correct partition for a simple select for the following partitioning scheme, > in which I'd like to automatically divide rows into fo

[GENERAL] hash partitioning

2008-09-03 Thread David West
Hi folks, I'm wondering why the postgres planner is not capable of determining the correct partition for a simple select for the following partitioning scheme, in which I'd like to automatically divide rows into four sub-tables, ie, a simple form of hash partitioning. Any ideas why this doe