RE: [HACKERS] RE: [GENERAL] Long update query ? (also Re: [GENERAL] CNF vs. DNF)
Taral <taral@mail.utexas.edu>
From: "Taral" <taral@mail.utexas.edu>
To: "Bruce Momjian" <maillist@candle.pha.pa.us>, <jwieck@debis.com>
Cc: <hackers@postgreSQL.org>
Date: 1998-10-02T21:12:19Z
Lists: pgsql-hackers, pgsql-general
> 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... Taral