pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Gavin Hamill <gdh@laterooms.com>
Cc: pgsql-performance@postgresql.org
Subject: Re: Slow query - possible bug?
Date: Thu, 13 Apr 2006 11:26:50 -0400
Message-ID: <20329.1144942010@sss.pgh.pa.us> (raw)
In-Reply-To: <443E4C9D.3090301@laterooms.com>
References: <443E3DF5.4020207@laterooms.com>
	<3c1395330604130546g6b091f75x511955817fe65dcd@mail.gmail.com>
	<443E4C9D.3090301@laterooms.com>

Gavin Hamill <gdh@laterooms.com> writes:
> If I replace the
> (allocation0_."Date" between '2006-06-09 00:00:00.000000' and 
> '2006-06-09 00:00:00.000000')
> with
> allocation0_."Date" ='2006-04-09 00:00:00.000000'
> then the query comes back in a few milliseconds (as I'd expect :)

Could we see EXPLAIN ANALYZE for
* both forms of the date condition, with the roomid condition;
* both forms of the date condition, WITHOUT the roomid condition;
* just the roomid condition

I'm thinking the planner is misestimating something, but it's hard
to tell what without breaking it down.

			regards, tom lane



view thread (10+ messages)  latest in thread

Message-ID: <20329.1144942010@sss.pgh.pa.us>
Permalink:  ../20329.1144942010@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/20329.1144942010@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-performance@postgresql.org
  Cc: tgl@sss.pgh.pa.us, gdh@laterooms.com
  Subject: Re: Slow query - possible bug?
  In-Reply-To: <20329.1144942010@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