Skip site navigation (1) Skip section navigation (2)

Re: query plan

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "ag20" <ag20(at)co(dot)merced(dot)ca(dot)us>
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: query plan
Date: 2001-10-04 19:36:33
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-bugs
"ag20" <ag20(at)co(dot)merced(dot)ca(dot)us> writes:
> Is there a reason that the expressions:
>  Crops.change_e > '10/1/2001'
>  '10/1/2001' < Crops.change_e
> when used in a WHERE clause of a query should yield
> a good plan for the first and a bad plan for the second?

I think you have a broken installation.  I get this plan either way
on 7.1:

Nested Loop  (cost=0.00..4.96 rows=1 width=64)
  ->  Nested Loop  (cost=0.00..3.54 rows=1 width=48)
        ->  Index Scan using crops_loct on crops  (cost=0.00..2.02 rows=1 width=32)
        ->  Seq Scan on plantunits  (cost=0.00..1.17 rows=17 width=16)
  ->  Seq Scan on commtypes  (cost=0.00..1.13 rows=13 width=16)

The wacko numbers and "nan"s in your output look like something is
fairly hosed internally --- disagreement between different files about
a struct layout is my first thought.  How did you compile or come by
your executables?

			regards, tom lane

In response to

pgsql-bugs by date

Next:From: Peter EisentrautDate: 2001-10-04 20:07:49
Subject: Re: \lo_unlink results in "ERROR: pg_description: Permission
Previous:From: Bruce MomjianDate: 2001-10-04 18:16:06
Subject: Re: Long options for psql in 7.1.3

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group