Re: Canonicalization of WHERE clauses considered harmful

Поиск
Список
Период
Сортировка
От Kurt Roeckx
Тема Re: Canonicalization of WHERE clauses considered harmful
Дата
Msg-id 20031210221955.GA26735@ping.be
обсуждение исходный текст
Ответ на Canonicalization of WHERE clauses considered harmful  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: Canonicalization of WHERE clauses considered harmful  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
On Wed, Dec 10, 2003 at 04:54:54PM -0500, Tom Lane wrote:
> Currently, this is accomplished by the roundabout method of converting
> the WHERE clause to CNF (AND-of-ORs) and then simplifying duplicate
> sub-clauses within an OR:
>     (a AND b) OR (a AND c)
> expands by repeated application of the distributive law to
>     (a OR a) AND (a OR c) AND (b OR a) AND (b OR c)

This is wrong.

What would be true however is:

(a OR b) AND (b OR C)
= (a AND b) OR (a AND c) OR (b AND b) OR (b AND C)

(Replace AND by * and OR by +)


Kurt



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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Canonicalization of WHERE clauses considered harmful
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Canonicalization of WHERE clauses considered harmful