pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Sergei Barbarash <sgt@www.dot.ru>
To: pgsql-sql@postgreSQL.org
Subject: indexing datetime
Date: Thu, 3 Sep 1998 19:11:11 +0400 (MSD)
Message-ID: <199809031511.TAA03736@www.dot.ru> (raw)

I have a very large and fast-growing table with a datetime field. Most of my 
queries are based on date comparison as well. Like:

select * from table where time > 'Aug 1 0:0:0 1998' and time < 'Sep 1 0:0:0 
1998';

How can I index the table to optimize my queries? Or maybe datetime is a bad 
choice for this?

-- Sergei



view thread (3+ messages)

Message-ID: <199809031511.TAA03736@www.dot.ru>
Permalink:  ../199809031511.TAA03736@www.dot.ru/
Also on:    postgresql.org/message-id/199809031511.TAA03736@www.dot.ru

 · 

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 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-sql@postgresql.org
  Cc: sgt@www.dot.ru
  Subject: Re: indexing datetime
  In-Reply-To: <199809031511.TAA03736@www.dot.ru>
  References: <199809031511.TAA03736@www.dot.ru>

* 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