Re: Question on round-robin partitioning

Поиск
Список
Период
Сортировка
От Vick Khera
Тема Re: Question on round-robin partitioning
Дата
Msg-id 2968dfd60908311314u74f7c6f8ta6402fd255eba177@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Question on round-robin partitioning  (Alban Hertroys <dalroi@solfertje.student.utwente.nl>)
Список pgsql-general
On Sat, Aug 29, 2009 at 7:31 AM, Alban
Hertroys<dalroi@solfertje.student.utwente.nl> 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.

Depending on how your code makes up the queries, you can bypass
constraint exclusion and reference the sub table directly.  This is
how we do it.  We have only one query in our entire system that cannot
do this, because we always work on exactly one foo_id at a time except
when doing global statistics which scan every row anyhow.  There's
really no point testing 100 constraints for a foo_id=100 type query
since you can do that in your code before hand much more efficiently.

В списке pgsql-general по дате отправления:

Предыдущее
От: BlackMage
Дата:
Сообщение: Import Using PHPPGADMIN
Следующее
От: Sheng Cheng
Дата:
Сообщение: Aggregate function with subquery in 8.3 and 8.4.