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

Поиск
Список
Период
Сортировка
От Bruce Momjian
Тема Re: [HACKERS] RE: [GENERAL] Long update query ? (also Re: [GENERAL] CNF vs. DNF)
Дата
Msg-id 199810022139.RAA21082@candle.pha.pa.us
обсуждение исходный текст
Ответ на RE: [HACKERS] RE: [GENERAL] Long update query ? (also Re: [GENERAL] CNF vs. DNF)  ("Taral" <taral@mail.utexas.edu>)
Список pgsql-hackers
[Charset iso-8859-1 unsupported, filtering to ASCII...]
> > Another idea is that we rewrite queries such as:
> >
> >     SELECT *
> >     FROM tab
> >     WHERE (a=1 AND b=2 AND c=3) OR
> >           (a=1 AND b=2 AND c=4) OR
> >           (a=1 AND b=2 AND c=5) OR
> >           (a=1 AND b=2 AND c=6)
> >
> > into:
> >
> >     SELECT *
> >     FROM tab
> >     WHERE (a=1 AND b=2) AND (c=3 OR c=4 OR c=5 OR c=6)
>
> Very nice, but that's like trying to code factorization of numbers... not
> pretty, and very CPU intensive on complex queries...

Yes, but how large are the WHERE clauses going to be?  Considering the
cost of cnfify() and UNION, it seems like a clear win.  Is it general
enough to solve our problems?

--
  Bruce Momjian                        |  http://www.op.net/~candle
  maillist@candle.pha.pa.us            |  (610) 853-3000
  +  If your life is a hard drive,     |  830 Blythe Avenue
  +  Christ can be your backup.        |  Drexel Hill, Pennsylvania 19026


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

Предыдущее
От: Bruce Momjian
Дата:
Сообщение: Re: [HACKERS] Open 6.4 items
Следующее
От: Bruce Momjian
Дата:
Сообщение: Re: [GENERAL] Bug in contrib/spi/refint.c