From: | Charles Tassell <ctassell(at)isn(dot)net> |
---|---|
To: | Martijn van Oosterhout <kleptog(at)cupid(dot)suninternet(dot)com>, Andras Balogh <abalogh(at)grafx(dot)ro> |
Cc: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: pgsql DATE |
Date: | 2000-04-26 18:06:19 |
Message-ID: | 4.2.0.58.20000426150522.00aabe40@mailer.isn.net |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Might want to try date BETWEEN '01/4/2000' AND '01/5/2000' as well, this
is probably optimized better (although I may be wrong.)
At 11:41 AM 4/26/00, Martijn van Oosterhout wrote:
>Andras Balogh wrote:
> > So i am looking a date type that would allow me to do the following
> with one
> > (or a few) query
> > (and to be fast too):
> > -select all records for a given month
> > -select the count of records where the hour is 14.
> > -select all the records from the 7th week.
> > -select count of records where the day of the week is Sunday.
> > etc.
>
>How about you write your queries like:
>
>date >= '01/4/2000' and date < '01/5/2000'
>
>or equivalent. It allows use of the index but works the same.
>Except for the day is Sunday though...
>--
>Martijn van Oosterhout <kleptog(at)cupid(dot)suninternet(dot)com>
>http://cupid.suninternet.com/~kleptog/
From | Date | Subject | |
---|---|---|---|
Next Message | Lamar Owen | 2000-04-26 18:10:50 | Re: How to connect using pg_connect function from php3 ? |
Previous Message | Luiz Antonio | 2000-04-26 17:28:49 | How to connect using pg_connect function from php3 ? |