pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Tobias Brox <tobias@nordicbet.com>
Cc: Kjell Tore Fossbakk <kjelltore@gmail.com>
Cc: Michael Glaesemann <grzm@myrealbox.com>
Cc: pgsql-performance@postgresql.org
Subject: Re: Querying 19million records very slowly
Date: Wed, 22 Jun 2005 09:50:39 -0400
Message-ID: <27060.1119448239@sss.pgh.pa.us> (raw)
In-Reply-To: <20050622093644.GA7839@tobias>
References: <e79986c505062112094f579a9b@mail.gmail.com>
	<42B8719A.6040809@refractions.net>
	<op.ssqot4d4th1vuj@localhost>
	<e79986c505062200457fe97695@mail.gmail.com>
	<20050622080357.GW7839@tobias>
	<e79986c5050622011828dd4b41@mail.gmail.com>
	<20050622083921.GZ7839@tobias>
	<8B2836FF-F335-49A4-8131-8EF2D02100F9@myrealbox.com>
	<e79986c50506220210578776e@mail.gmail.com>
	<20050622093644.GA7839@tobias>

Tobias Brox <tobias@nordicbet.com> writes:
>> time (datetime) > '2005-06-21 10:36:22+02'
>> or 
>> time (timestamp) > 'some timestamp pointing to yesterday'

> If I have understood it correctly, the planner will recognize the timestamp
> and compare it with the statistics in the first example but not in the
> second, and thus it will be more likely to use index scan on the first one
> and seqscan on the second.

That statement is true for releases before 8.0.  Kjell has not at any
point told us what PG version he is running, unless I missed it...

			regards, tom lane



view thread (17+ messages)  latest in thread

Message-ID: <27060.1119448239@sss.pgh.pa.us>
Permalink:  ../27060.1119448239@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/27060.1119448239@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, tobias@nordicbet.com, kjelltore@gmail.com, grzm@myrealbox.com
  Subject: Re: Querying 19million records very slowly
  In-Reply-To: <27060.1119448239@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