pg.ddx.io pgsql-performance@postgresql.org mailing list archivehelp / color / mirror / Atom feed
From: a3a18850@telus.net
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Mischa <mischa.Sandberg@telus.net>
Cc: pgsql-performance@postgresql.org
Subject: Re: Recognizing range constraints (was Re: Plan for relatively simple query seems to be very inefficient)
Date: Thu, 7 Apr 2005 17:30:11 -0700
Message-ID: <1112920211.4255d0934e23d@webmail.telus.net> (raw)
In-Reply-To: <23152.1112918336@sss.pgh.pa.us>
References: <425413D3.5030304@vulcanus.its.tudelft.nl>
<28552.1112809334@sss.pgh.pa.us>
<425423A9.9000504@vulcanus.its.tudelft.nl>
<5999.1112820690@sss.pgh.pa.us>
<6326.1112825377@sss.pgh.pa.us>
<20050407143120.GA29575@wolff.to>
<16907.1112883624@sss.pgh.pa.us>
<1112909198.4255a58eae0d8@webmail.telus.net>
<23152.1112918336@sss.pgh.pa.us>
Quoting Tom Lane <tgl@sss.pgh.pa.us>:
> Mischa <mischa.Sandberg@telus.net> writes:
> > Quoting Tom Lane <tgl@sss.pgh.pa.us>:
> >> WHERE a.x > b.y AND a.x < 42
>
> > Out of curiosity, will the planner induce "b.y < 42" out of this?
>
> No. There's some smarts about transitive equality, but none about
> transitive inequalities. Offhand I'm not sure if it'd be useful to add
> such. The transitive-equality code pulls its weight [...]
> but I'm less able to think of common use-cases for transitive
> inequality ...
Thanks. My apologies for not just going and looking at the code first.
Equality-transitives: yes, worth their weight in gold.
Inequality-transitivies: I see in OLAP queries (usually ranges), or in queries
against big UNION ALL views, where const false inequalities are the norm.
"a.x > b.y and a.x < c.z" comes up in OLAP, too, usually inside an EXISTS(...),
where you are doing something analogous to finding a path.
view thread (12+ messages)
Message-ID: <1112920211.4255d0934e23d@webmail.telus.net> Permalink: ../1112920211.4255d0934e23d@webmail.telus.net/ Also on: postgresql.org/message-id/1112920211.4255d0934e23d@webmail.telus.net ·
reply
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Reply to all the recipients using the --to and --cc options: reply via email To: pgsql-performance@postgresql.org Cc: a3a18850@telus.net, tgl@sss.pgh.pa.us, mischa.Sandberg@telus.net Subject: Re: Recognizing range constraints (was Re: Plan for relatively simple query seems to be very inefficient) In-Reply-To: <1112920211.4255d0934e23d@webmail.telus.net> * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions for how to clone and mirror all data and code used for this inbox