pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Sergei Barbarash <sgt@dot.ru>
To: pgsql-sql@postgreSQL.org
Subject: indexing datetime
Date: Wed, 02 Sep 1998 11:07:42 +0400
Message-ID: <199809020707.LAA22700@zaraza.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)  latest in thread

Message-ID: <199809020707.LAA22700@zaraza.dot.ru>
Permalink:  ../199809020707.LAA22700@zaraza.dot.ru/
Also on:    postgresql.org/message-id/199809020707.LAA22700@zaraza.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@dot.ru
  Subject: Re: indexing datetime
  In-Reply-To: <199809020707.LAA22700@zaraza.dot.ru>
  References: <199809020707.LAA22700@zaraza.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