On Sat, Aug 29, 2009 at 7:31 AM, Alban
Hertroys wrote:
> What about foo_id = 100 AND foo_id % 8 = 100 % 8 ?
>
If the optimizer computes 100 % 8 before running the constraint
matching then it would work. I'm not sure it does. foo_id=100 and
foo_id % 8 = 4 will definitely match your constraint.
D
On 28 Aug 2009, at 21:13, Steven Lembark wrote:
If I query on foo_id % 8, explain shows the optimizer
using the constraint (1).
If I just query on foo_id = 100, the exclusion is
not used (2).
What would be the best way to feed the optimizer
enough data to use the partitioning with equality
quer
Purely for performance, I was looking into partitioning
some tables round-robin by value. Question is whether
there is any way to make use of this in constraint
exclusion.
Say I have a table foo with serial variable "foo_id".
The partition checks are
foo_id % 8 = 0
foo_id % 8 = 1
fo