Postgres not using index on views

Поиск
Список
Период
Сортировка
От David G. Johnston
Тема Postgres not using index on views
Дата
Msg-id CAKFQuwa4OiNpgZ9brTCh1dsM-asK2mMY+Wm6xOE6_gM5UngQ0w@mail.gmail.com
обсуждение исходный текст
Ответ на RE: Postgres not using index on views  (Rick Vincent <rvincent@temenos.com>)
Ответы RE: Postgres not using index on views
RE: Postgres not using index on views
Список pgsql-performance
On Friday, April 17, 2020, Rick Vincent <rvincent@temenos.com> wrote:
Hi,
 
I was wondering if anyone can explain the below problem.  Should a bug be logged for this?
 
Kind regards,
Rick
 
_____________________________________________
From: Rick Vincent
Sent: Tuesday, April 7, 2020 11:08 AM
To: 'Tom Lane' <tgl@sss.pgh.pa.us>; Justin Pryzby <pryzby@telsasoft.com>
Cc: pgsql-performance@postgresql.org; Manoj Kumar <manojkumar@temenos.com>; Herve Aubert <haubert@temenos.com>
Subject: RE: Postgres not using index on views
 
 
Hi Tom,
 
The function is defined as below, so no use of VOLATILE.  Let me know if you need any other information.  I am hoping the below will further clarify the issue.
 

IIUC as Tom wrote you have volatile functions (implied/default as Thomas wrote) attached to view column outputs and the planner will not optimize those away.

Mark your function immutable (assuming it is) and retry your experiment with the where clause query. 

David J.

В списке pgsql-performance по дате отправления:

Предыдущее
От: Rick Vincent
Дата:
Сообщение: RE: Postgres not using index on views
Следующее
От: Rick Vincent
Дата:
Сообщение: RE: Postgres not using index on views