pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Timur Irmatov <thor@sarkor.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: pgsql-performance@postgresql.org
Subject: Re: index usage
Date: Fri, 17 Jan 2003 20:08:14 +0500
Message-ID: <87109443711.20030117200814@sarkor.com> (raw)
In-Reply-To: <11751.1042815424@sss.pgh.pa.us>
References: <10597430257.20030117164800@sarkor.com>
	<11751.1042815424@sss.pgh.pa.us>

TL> Timur Irmatov <thor@sarkor.com> writes:
>> Limit  (cost=0.00..0.19 rows=1 width=6) (actual time=0.43..0.43 rows=0 loops=1)
>>   ->  Index Scan using timeindex on mediumstats  (cost=0.00..2898.96 rows=15185 width=6) (actual time=0.42..0.42 rows=0 loops=1)

TL> The planner has absolutely no clue about the behavior of your function,
TL> and so its estimate of the number of rows matched is way off, leading to
TL> a poor estimate of the cost of an indexscan.  There is not much to be
TL> done about this in the current system (though I've speculated about the
TL> possibility of computing statistics for functional indexes).

you're absolutely right.
thanks.

TL> Just out of curiosity, why don't you lose all this year/month/day stuff
TL> and use a timestamp column?  Less space, more functionality.

:-)
Well, I've a seen a lot of people on pgsql-general mailing list with
problems with dates, timestamps, and I was just scared of using
PostreSQL date and time types and functions..

May be, I should just try it myself before doing it other way...




view thread (34+ messages)  latest in thread

Message-ID: <87109443711.20030117200814@sarkor.com>
Permalink:  ../87109443711.20030117200814@sarkor.com/
Also on:    postgresql.org/message-id/87109443711.20030117200814@sarkor.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: thor@sarkor.com, tgl@sss.pgh.pa.us
  Subject: Re: index usage
  In-Reply-To: <87109443711.20030117200814@sarkor.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