From: Tom Lane <tgl@sss.pgh.pa.us>
To: Vlad Arkhipov <arhipov@dc.baikal.ru>
Cc: pgsql-performance@postgresql.org
Subject: Re: Statistics issue
Date: Sat, 31 May 2008 11:51:49 -0400
Message-ID: <16475.1212249109@sss.pgh.pa.us> (raw)
In-Reply-To: <483FDED1.1070503@dc.baikal.ru>
References: <483FDED1.1070503@dc.baikal.ru>
Vlad Arkhipov <arhipov@dc.baikal.ru> writes:
> EXPLAIN ANALYZE
> SELECT *
> FROM i
> WHERE d BETWEEN '2007-05-12' AND '2007-05-12'
> Index Scan using i_d on i (cost=0.00..2.39 rows=1 width=402) (actual
> time=0.053..4.284 rows=1721 loops=1)
> Index Cond: ((d >= '2007-05-12'::date) AND (d <= '2007-05-12'::date))
> Total runtime: 6.645 ms
> EXPLAIN ANALYZE
> SELECT *
> FROM i
> WHERE d = '2007-05-12'
> Index Scan using i_d on i (cost=0.00..38.97 rows=1572 width=402)
> (actual time=0.044..4.250 rows=1721 loops=1)
> Index Cond: (d = '2007-05-12'::date)
> Total runtime: 6.619 ms
Hmm, I wonder whether we shouldn't do something like this
http://archives.postgresql.org/pgsql-committers/2008-03/msg00128.php
for all range conditions, not just those made up by
prefix_selectivity().
regards, tom lane
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, arhipov@dc.baikal.ru
Subject: Re: Statistics issue
In-Reply-To: <16475.1212249109@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