From: | Zakkr <zakkr(at)zf(dot)jcu(dot)cz> |
---|---|
To: | "Aaron J(dot) Seigo" <aaron(at)gtv(dot)ca> |
Cc: | Stephen Walton <swalton(at)galileo(dot)csun(dot)edu>, pgsql-general(at)postgreSQL(dot)org |
Subject: | Re: [GENERAL] Slow lookups on dates? Or something else? |
Date: | 1999-10-26 07:41:52 |
Message-ID: | Pine.LNX.3.96.991026093149.12578A-100000@ara.zf.jcu.cz |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On Mon, 25 Oct 1999, Aaron J. Seigo wrote:
> hi...
> my experience has been that this:
>
> select date_time_field::date from table_name;
>
> is much faster than:
>
> select date_trunc('day',date) from table_name;
>
Yes, date_trunc() is comlicated routine, this func. must internal parse and
search your 'day' - it is slowly. (.. instead of datetime_date() which make
date from full DateTime only.)
Zakkr
------------------------------------------------------------------------------
<zakkr(at)zf(dot)jcu(dot)cz> http://home.zf.jcu.cz/~zakkr/
Kim Project: http://home.zf.jcu.cz/~zakkr/kim/ (process manager)
FTP: ftp://ftp2.zf.jcu.cz/users/zakkr/ (C/ncurses/PgSQL)
------------------------------------------------------------------------------
...and cathedral dilapidate
From | Date | Subject | |
---|---|---|---|
Next Message | Mike Brickman | 1999-10-26 08:05:00 | Windows Server? |
Previous Message | rony khoury | 1999-10-26 07:13:06 | subscirbe |