pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: JOE <joe@piscitella.com>
Cc: pgsql-sql@postgresql.org
Subject: Re: Unexplained SQL behavior
Date: Sat, 17 Aug 2002 21:55:24 -0400
Message-ID: <7208.1029635724@sss.pgh.pa.us> (raw)
In-Reply-To: <018f01c24653$b23d8000$c801a8c0@joe>
References: <018f01c24653$b23d8000$c801a8c0@joe>

"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



view thread (3+ messages)  latest in thread

Message-ID: <7208.1029635724@sss.pgh.pa.us>
Permalink:  ../7208.1029635724@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/7208.1029635724@sss.pgh.pa.us

 · 

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-sql@postgresql.org
  Cc: tgl@sss.pgh.pa.us, joe@piscitella.com
  Subject: Re: Unexplained SQL behavior
  In-Reply-To: <7208.1029635724@sss.pgh.pa.us>

* 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