Skip site navigation (1) Skip section navigation (2)

Re: Querying 19million records very slowly

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Tobias Brox <tobias(at)nordicbet(dot)com>
Cc: Kjell Tore Fossbakk <kjelltore(at)gmail(dot)com>,Michael Glaesemann <grzm(at)myrealbox(dot)com>,pgsql-performance(at)postgresql(dot)org
Subject: Re: Querying 19million records very slowly
Date: 2005-06-22 13:50:39
Message-ID: 27060.1119448239@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-performance
Tobias Brox <tobias(at)nordicbet(dot)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

In response to

pgsql-performance by date

Next:From: Paul RamseyDate: 2005-06-22 14:20:13
Subject: Re: Querying 19million records very slowly
Previous:From: Oleg BartunovDate: 2005-06-22 10:53:20
Subject: Re: Forums & tsearch2 - best practices reg. concurrency

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group