Re: [GENERAL] Question on round-robin partitioning

2009-08-31 Thread Vick Khera
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

Re: [GENERAL] Question on round-robin partitioning

2009-08-29 Thread Alban Hertroys
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

[GENERAL] Question on round-robin partitioning

2009-08-28 Thread Steven Lembark
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