Re: [GENERAL] Long update query ? (also Re: [GENERAL] CNF vs. DNF)

Поиск
Список
Период
Сортировка
От Taral
Тема Re: [GENERAL] Long update query ? (also Re: [GENERAL] CNF vs. DNF)
Дата
Msg-id 000001bded95$94a20cc0$3b291f0a@taral
обсуждение исходный текст
Ответ на Re: [GENERAL] Long update query ?  (Bruce Momjian <maillist@candle.pha.pa.us>)
Ответы Re: [GENERAL] Long update query ? (also Re: [GENERAL] CNF vs. DNF)  (Bruce Momjian <maillist@candle.pha.pa.us>)
Список pgsql-general
> > Wouldn't disjunctive normal form be better, since it can be
> implemented as
> > the simple union of a set of small queries?
>
> Please tell us more.

Well, I don't know how the backend processes queries, but one can imagine
this scenario (for DNF):

1) Analyze query and set up columns in result table
2) Rewrite query into DNF
3) Split query into subqueries
4) For each subquery:
  a) Process query
  b) Append matching tuples to result table
5) Do any post-processing (ORDER BY, etc.)
6) Return result

How is the processing currently done (with CNF)?

Taral


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

Предыдущее
От: Bruce Momjian
Дата:
Сообщение: Re: [GENERAL] Long update query ?
Следующее
От: Bruce Momjian
Дата:
Сообщение: Re: [GENERAL] IN/NOT IN operators