pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: mixo <mixo@beth.uniforum.org.za>
To: pgsql-sql <pgsql-sql@postgresql.org>
Subject: two dates
Date: Tue, 25 Feb 2003 08:55:05 +0200
Message-ID: <3E5B1349.80705@beth.uniforum.org.za> (raw)

I have a table which has serveral time stamps include when an entry was 
'created'.
Each entry is identified by a unique 'id'. How can I best find entries 
created
between two dates without going through each day between the two dates?

Currently, going through each day to get the results takes about 23 
minutes for 7 days
as I have two other criteria for search: roughly I am doing about 
16*17*n queries,
where n=days between two dates (for 7 days, 16*17*7 = which a number 
that is
too big for my liking).





view thread (4+ messages)  latest in thread

Message-ID: <3E5B1349.80705@beth.uniforum.org.za>
Permalink:  ../3E5B1349.80705@beth.uniforum.org.za/
Also on:    postgresql.org/message-id/3E5B1349.80705@beth.uniforum.org.za

 · 

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 using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: mixo@beth.uniforum.org.za
  Subject: Re: two dates
  In-Reply-To: <3E5B1349.80705@beth.uniforum.org.za>

* 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