Re: not using index through procedure
| От | Robin Ericsson |
|---|---|
| Тема | Re: not using index through procedure |
| Дата | |
| Msg-id | i5la0q.7aku8p@webmail.zint.profecta.se обсуждение исходный текст |
| Ответ на | Re: not using index through procedure (Martijn van Oosterhout <kleptog@svana.org>) |
| Ответы |
Re: not using index through procedure
|
| Список | pgsql-general |
Martijn van Oosterhout <kleptog@svana.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
В списке pgsql-general по дате отправления: