Re: [HACKERS] Date operations

From: Thomas Lockhart <lockhart(at)alumni(dot)caltech(dot)edu>
To: Oliver Smith <oliver(at)kfs(dot)org>
Cc: pgsql-hackers(at)postgreSQL(dot)org
Subject: Re: [HACKERS] Date operations
Date: 1999-03-31 16:21:35
Message-ID: 37024B8F.DE7CE2EE@alumni.caltech.edu
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

> Question 3:
> Because this query gets hit a lot, would it make sense to create an
> index
> CREATE INDEX tbl_robot_logs_at_age_idx ON tbl_robot_logs
> ( AGE(at) );

Nope, since "age" is calculated from "now", which is alway changing.
You can't make a useful index on a non-constant expression or
function.

- Tom

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Clark Evans 1999-03-31 16:22:40 Bug Report - alter table does not work on temporary tables
Previous Message Thomas Lockhart 1999-03-31 16:19:54 Re: [HACKERS] Date operations