RE: [HACKERS] RE: [GENERAL] Long update query ? (also Re: [GENERAL] CNF vs. DNF) - Mailing list pgsql-hackers

From Taral
Subject RE: [HACKERS] RE: [GENERAL] Long update query ? (also Re: [GENERAL] CNF vs. DNF)
Date
Msg-id 000001bdee49$56c7cd40$3b291f0a@taral
Whole thread Raw
In response to Re: [HACKERS] RE: [GENERAL] Long update query ? (also Re: [GENERAL] CNF vs. DNF)  (Bruce Momjian <maillist@candle.pha.pa.us>)
Responses Re: [HACKERS] RE: [GENERAL] Long update query ? (also Re: [GENERAL] CNF vs. DNF)  (Bruce Momjian <maillist@candle.pha.pa.us>)
List pgsql-hackers
> 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


pgsql-hackers by date:

Previous
From: "Taral"
Date:
Subject: RE: [HACKERS] RE: [GENERAL] Long update query ? (also Re: [GENERAL] CNF vs. DNF)
Next
From: Bruce Momjian
Date:
Subject: Re: [HACKERS] Open 6.4 items