Re: bug in query planning?

From: Steven D(dot)Arnold <stevena(at)neosynapse(dot)net>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-general <pgsql-general(at)postgresql(dot)org>
Subject: Re: bug in query planning?
Date: 2003-12-22 17:36:09
Message-ID: 547BEBA6-34A5-11D8-96F2-000A95BA4396@neosynapse.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general


On Dec 21, 2003, at 11:47 PM, Tom Lane wrote:

> "Steven D.Arnold" <stevena(at)neosynapse(dot)net> writes:
>> Query (2) below is the same query, but we reverse the order of the
>> tables. It's obviously not quite the same query semantically, even
>> though in my case it should always produce the same result.
>
> Since it is in fact not the same query, I'm unclear on why you expect
> it to produce the same plan.

What I expect is for both queries to use the index on the messages
table! Why is it not doing that?

> FWIW, I believe that 7.4 will recognize that (1) and (3) are
> semantically equivalent.

I will try 7.4 and report back.

steve

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Bruce Momjian 2003-12-22 17:56:15 Re: postmaster and logrotate
Previous Message Joshua D. Drake 2003-12-22 17:31:55 Re: PostgreSQL speakers needed for OSCON 2004