index on timestamp performance

From: Eric Cholet <cholet(at)logilune(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: index on timestamp performance
Date: 2003-01-29 16:37:15
Message-ID: 195290000.1043858235@shambala.logilune.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

I have this schema:

motid | integer | not null
objid | integer | not null
date | timestamp without time zone | not null
Indexes: dico_frs_motid_date btree (motid, date)
dico_frs_objid btree (objid)

The performance I'm getting from the index that contains
'date' is much slower than when using the objid index
(different queries of course). This is a 10 million row
table. Am I right to assume that postgres needs to do
more work because it has to convert the dates to some
internal (integer?) format?
Consequently would I gain performance if I changed the
schema so that 'date' is an integer (which would not
be a problem for my application) ?

Thanks,
--
Eric Cholet

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Evan Macosko 2003-01-29 16:46:26 UNSUBSCRIBE ME PLEASE!
Previous Message Tom Lane 2003-01-29 16:34:42 Re: numeric usernames in 7.3.1?