From:
"Taral" <taral(at)mail(dot)utexas(dot)edu>
To:
"Bruce Momjian" <maillist(at)candle(dot)pha(dot)pa(dot)us>
Cc:
<jwieck(at)debis(dot)com>, <hackers(at)postgreSQL(dot)org>
Subject:
RE: [HACKERS] RE: [GENERAL] Long update query ? (also Re: [GENERAL] CNF vs. DNF)
Date:
1998-10-02 21:49:26
Message-ID:
000001bdee4e$86688b20$3b291f0a@taral (view raw or flat )
Thread:
1998-09-27 09:20:35 from "Sergei Chernev" <ser(at)nsu(dot)ru>
1998-09-28 13:21:08 from David Hartwig <daveh(at)insightdist(dot)com>
1998-09-28 17:15:01 from "Taral" <taral(at)mail(dot)utexas(dot)edu>
1998-10-01 22:54:19 from Bruce Momjian <maillist(at)candle(dot)pha(dot)pa(dot)us>
1998-10-01 23:45:33 from "Taral" <taral(at)mail(dot)utexas(dot)edu>
1998-10-02 02:18:29 from Bruce Momjian <maillist(at)candle(dot)pha(dot)pa(dot)us>
1998-10-02 05:35:12 from "Taral" <taral(at)mail(dot)utexas(dot)edu>
1998-10-02 06:02:48 from Bruce Momjian <maillist(at)candle(dot)pha(dot)pa(dot)us>
1998-10-02 16:37:15 from "Taral" <taral(at)mail(dot)utexas(dot)edu>
1998-10-02 16:40:56 from Bruce Momjian <maillist(at)candle(dot)pha(dot)pa(dot)us>
1998-10-02 16:47:48 from "Taral" <taral(at)mail(dot)utexas(dot)edu>
1998-10-02 17:31:18 from jwieck(at)debis(dot)com (Jan Wieck)
1998-10-02 17:58:25 from Bruce Momjian <maillist(at)candle(dot)pha(dot)pa(dot)us>
1998-10-02 21:12:19 from "Taral" <taral(at)mail(dot)utexas(dot)edu>
1998-10-02 21:39:05 from Bruce Momjian <maillist(at)candle(dot)pha(dot)pa(dot)us>
1998-10-02 21:49:26 from "Taral" <taral(at)mail(dot)utexas(dot)edu>
1998-10-02 21:57:15 from Bruce Momjian <maillist(at)candle(dot)pha(dot)pa(dot)us>
1998-10-02 22:04:24 from "Taral" <taral(at)mail(dot)utexas(dot)edu>
1998-10-03 03:01:07 from Bruce Momjian <maillist(at)candle(dot)pha(dot)pa(dot)us>
1998-10-04 01:57:30 from Bruce Momjian <maillist(at)candle(dot)pha(dot)pa(dot)us>
1998-10-04 02:26:20 from "Taral" <taral(at)mail(dot)utexas(dot)edu>
1998-10-04 03:32:14 from Bruce Momjian <maillist(at)candle(dot)pha(dot)pa(dot)us>
1998-10-05 14:33:37 from David Hartwig <daveh(at)insightdist(dot)com>
1998-10-06 02:23:13 from Bruce Momjian <maillist(at)candle(dot)pha(dot)pa(dot)us>
1998-10-06 15:28:22 from David Hartwig <daveh(at)insightdist(dot)com>
1998-10-07 02:41:21 from Bruce Momjian <maillist(at)candle(dot)pha(dot)pa(dot)us>
1998-10-07 17:56:18 from Bruce Momjian <maillist(at)candle(dot)pha(dot)pa(dot)us>
1998-10-07 20:34:15 from David Hartwig <daveh(at)insightdist(dot)com>
1998-10-07 21:33:07 from Bruce Momjian <maillist(at)candle(dot)pha(dot)pa(dot)us>
1998-10-02 17:40:39 from Bruce Momjian <maillist(at)candle(dot)pha(dot)pa(dot)us>
Lists:
pgsql-general pgsql-hackers
> > 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?
Could be... the examples I received where the cnfify() was really bad were
cases where the query was submitted alredy in DNF... and where the UNION was
a simple one. However, I don't know of any algorithms for generic
simplification of logical constraints. One problem is resolution/selection
of factors:
SELECT * FROM a WHERE (a = 1 AND b = 2 AND c = 3) OR (a = 4 AND b = 2 AND c
= 3) OR (a = 1 AND b = 5 AND c = 3) OR (a = 1 AND b = 2 AND c = 6);
Try that on for size. You can understand why that code gets ugly, fast.
Somebody could try coding it, but it's not a clear win to me.
My original heuristic was missing one thing: "Where the heuristic fails to
process or decide, default to CNF." Since that's the current behavior, we're
less likely to break things.
Taral
In response to
Responses
pgsql-hackers by date
Next :From: Bruce MomjianDate: 1998-10-02 21:57:15
Subject : Re: [HACKERS] RE: [GENERAL] Long update query ? (also Re: [GENERAL] CNF vs. DNF)
Previous :From : Bruce MomjianDate : 1998-10-02 21:39:05
Subject : Re: [HACKERS] RE: [GENERAL] Long update query ? (also Re: [GENERAL] CNF vs. DNF)
pgsql-general by date
Next :From: Bruce MomjianDate: 1998-10-02 21:57:15
Subject : Re: [HACKERS] RE: [GENERAL] Long update query ? (also Re: [GENERAL] CNF vs. DNF)
Previous :From : Bruce MomjianDate : 1998-10-02 21:39:05
Subject : Re: [HACKERS] RE: [GENERAL] Long update query ? (also Re: [GENERAL] CNF vs. DNF)