From: Timur Irmatov <thor@sarkor.com>
To: pgsql-performance@postgresql.org
Cc: pgsql-general@postgresql.org
Subject: types & index usage
Date: Thu, 23 Jan 2003 13:14:25 +0500
Message-ID: <746750156.20030123131425@sarkor.com> (raw)
Hi!
I have a table with year, month, day and hour fields (all SMALLINT
type). Selecting one row from it takes about 40 msecs, and I am
trying now to use DATE type instead of first three fields.
Now select time decreased to less than millisecond, but I found that i
must use this form: hour=10::smallint instead of simple hour=10,
because in the latter case PostgreSQL does sequential scan.
I've heard something about type coercion issues, so I just want to say
that it is very funny to see such sort of things...
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 from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-performance@postgresql.org
Cc: thor@sarkor.com, pgsql-general@postgresql.org
Subject: Re: types & index usage
In-Reply-To: <746750156.20030123131425@sarkor.com>
References: <746750156.20030123131425@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