Re: Unexplained SQL behavior - Mailing list pgsql-sql

From Tom Lane
Subject Re: Unexplained SQL behavior
Date
Msg-id 7208.1029635724@sss.pgh.pa.us
Whole thread Raw
In response to Unexplained SQL behavior  ("JOE" <joe@piscitella.com>)
List pgsql-sql
"JOE" <joe@piscitella.com> writes:
> In the examples below I have a view with 10 columns.  I run an explain plan=
>  and it uses the primary key of the driver table (enrollment table) as to b=
> e expected and executes in 1.86 msec.  When I added another columns (and it=
>  is a null value casted to a timestamp - LASTACCESSED) the execution plan n=
> ow uses a totally different plan and now runs for 8622.16 msec.  Anyone hav=
> e any ideas or explination that may help understand??  --- thanks

Seems odd to me too, but it's difficult to speculate without being able
to try to reproduce the example.  Could we see the full declarations of
the tables involved?  (pg_dump -s output would be good.)
        regards, tom lane


pgsql-sql by date:

Previous
From: "JOE"
Date:
Subject: Unexplained SQL behavior
Next
From: "Julian Scarfe"
Date:
Subject: Ordering with GROUPs