Re: hash partitioning

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "David West" <david(dot)west(at)cusppoint(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: hash partitioning
Date: 2008-09-03 17:21:25
Message-ID: 27677.1220462485@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

"David West" <david(dot)west(at)cusppoint(dot)com> 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 partitioning constraints simple, else the planner may not be
able to prove that partitions don't need to be visited. Use simple
equality conditions for list partitioning, or simple range tests for
range partitioning, as illustrated in the preceding examples. A good
rule of thumb is that partitioning constraints should contain only
comparisons of the partitioning column(s) to constants using
B-tree-indexable operators.

regards, tom lane

In response to

Browse pgsql-general by date

  From Date Subject
Next Message William Garrison 2008-09-03 17:36:49 Re: hash partitioning
Previous Message William Garrison 2008-09-03 17:17:53 Simple query not using index: why?