Re: not using index through procedure

From: "Robin Ericsson" <robin(dot)ericsson(at)profecta(dot)se>
To: Martijn van Oosterhout <kleptog(at)svana(dot)org>, "Robin Ericsson" <robin(dot)ericsson(at)profecta(dot)se>
Cc: "Postgres general mailing list" <pgsql-general(at)postgresql(dot)org>
Subject: Re: not using index through procedure
Date: 2004-10-14 19:26:50
Message-ID: i5la0q.7aku8p@webmail.zint.profecta.se
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Martijn van Oosterhout <kleptog(at)svana(dot)org> wrote:

> One's marked VOLATILE, the other is marked IMMUTABLE. This affects
> whether it's considered a constant, the planner estimates and hence
> whether it uses the index.

Is there even a way to solve it this way via a procedure?

I've tried different approaches, with moving the ago outside the procedure,
having the procedure take timestamp as argument instead of interval, but still
no luck.

However, remove the $1 argument all together and replace that with ago('60
seconds') makes the procedure fly.

Regards,
Robin
_________________________________________________________
This mail sent using V-webmail - http://www.v-webmail.org

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Josh Close 2004-10-14 20:30:08 dirty reads
Previous Message nd02tsk 2004-10-14 18:58:32 Does PostgreSQL provide anything comparable with MySQL Cluster?