pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Hannu Krosing <hannu@tm.ee>
To: Shea,Dan [CIS] <Dan.Shea@ec.gc.ca>
Cc: 'josh@agliodbs.com' <josh@agliodbs.com>
Cc: pgsql-performance@postgresql.org
Subject: Re: database performance and query performance question
Date: Thu, 22 Jan 2004 22:53:37 +0200
Message-ID: <1074804816.2592.4.camel@fuji.krosing.net> (raw)
In-Reply-To: <1074804406.2592.2.camel@fuji.krosing.net>
References: <F2D63B916C88C14D9B59F93C2A5DD33F0B9119@cisxa.cis.ec.gc.ca>
	<1074804406.2592.2.camel@fuji.krosing.net>

Hannu Krosing kirjutas N, 22.01.2004 kell 22:46:
> Shea,Dan [CIS] kirjutas N, 22.01.2004 kell 22:35:
> > 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?
> 
> It probably can't tell if > is selective enough to justify using index.
> 
> Together with "limit 10" it may be.
> 
> You could try 
> 
> explain analyze select * from forecastelement where valid_time between 
> '2004-01-22'::date and '2004-01-22'::date limit 10;

Sorry, that should have been:

between '2004-01-22'::date and '2004-01-23'::date


> to see if this is considered good enough.
> 
> --------------
> Hannu
> 
> 
> ---------------------------(end of broadcast)---------------------------
> TIP 1: subscribe and unsubscribe commands go to majordomo@postgresql.org



view thread (13+ messages)  latest in thread

Message-ID: <1074804816.2592.4.camel@fuji.krosing.net>
Permalink:  ../1074804816.2592.4.camel@fuji.krosing.net/
Also on:    postgresql.org/message-id/1074804816.2592.4.camel@fuji.krosing.net

 · 

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: hannu@tm.ee, Dan.Shea@ec.gc.ca, josh@agliodbs.com
  Subject: Re: database performance and query performance question
  In-Reply-To: <1074804816.2592.4.camel@fuji.krosing.net>

* 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