Re: indexing timestamp fields

From: Christopher Browne <cbbrowne(at)libertyrms(dot)info>
To: pgsql-sql(at)postgresql(dot)org
Subject: Re: indexing timestamp fields
Date: 2003-10-15 16:21:48
Message-ID: 60wub6wjxf.fsf@dev6.int.libertyrms.info
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

teknokrat <teknokrat(at)yahoo(dot)com> writes:
> Is it a good idea to index timestamp fields? what about date fields in
> general?

If you need to order by a timestamp, then it can be worthwhile.

If that timestamp can be null, and is rarely populated, then you might
get a _big_ benefit from creating a partial index as with:

create index by_some_date on my_table(some_date) where some_date is
not null;
--
"cbbrowne","@","libertyrms.info"
<http://dev6.int.libertyrms.com/>
Christopher Browne
(416) 646 3304 x124 (land)

In response to

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Muhyiddin A.M Hayat 2003-10-15 19:59:21 Calc
Previous Message teknokrat 2003-10-15 15:56:56 indexing timestamp fields