pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Josh Berkus <josh@agliodbs.com>
To: Shea,Dan [CIS] <Dan.Shea@ec.gc.ca>
To: 'josh@agliodbs.com' <josh@agliodbs.com>
To: pgsql-performance@postgresql.org
Subject: Re: database performance and query performance question
Date: Thu, 22 Jan 2004 12:43:15 -0800
Message-ID: <200401221243.15312.josh@agliodbs.com> (raw)
In-Reply-To: <F2D63B916C88C14D9B59F93C2A5DD33F0B9119@cisxa.cis.ec.gc.ca>
References: <F2D63B916C88C14D9B59F93C2A5DD33F0B9119@cisxa.cis.ec.gc.ca>

Dan,

> Something that I do not understand is why if you use a valid_time =
> '2004-01-22 00:00:00' the query will use the index but if you do a
> valid_time >  '2004-01-22 00:00:00' it does not use the index?

Because of the expected number of rows to be returned.  Take a look at the row 
estimates on the forecastleelement scans.   

You can improve these estimates by increasing the ANALYZE stats and/or running 
ANALYZE more often.   Of course, increasing the stats makes analyze run 
slower ...

-- 
-Josh Berkus
 Aglio Database Solutions
 San Francisco




view thread (13+ messages)  latest in thread

Message-ID: <200401221243.15312.josh@agliodbs.com>
Permalink:  ../200401221243.15312.josh@agliodbs.com/
Also on:    postgresql.org/message-id/200401221243.15312.josh@agliodbs.com

 · 

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: josh@agliodbs.com, Dan.Shea@ec.gc.ca
  Subject: Re: database performance and query performance question
  In-Reply-To: <200401221243.15312.josh@agliodbs.com>

* 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