Re: Postgres not using index on views

Поиск
Список
Период
Сортировка
От Laurenz Albe
Тема Re: Postgres not using index on views
Дата
Msg-id 1b2a5b7c6c3a5610be90944ab43c3b53a4def335.camel@cybertec.at
обсуждение исходный текст
Ответ на Postgres not using index on views  (Rick Vincent <rvincent@temenos.com>)
Список pgsql-performance
On Mon, 2020-04-06 at 14:19 +0000, Rick Vincent wrote:
> I am seeing a performance problem with postgresql v 11.7 on views, and I am wondering if
> anyone can tell me why or has any suggestion.

Your account is somewhat confused - too many questions rolled into one
rant, I would say.

There are two points that may clear up the case:

- If you have no WHERE clause, a sequential scan of the table is usually
  the best way to do it.  The exception is an index only scan if the index
  contains all that is required, but in PostgreSQL you need a recently
  VACUUMed table for that.

- The expensive part in your view is the "extractValueJS" function.
  Try to tune that for better performance.

If any of your problems are not explained by that, please say so.

Yours,
Laurenz Albe
-- 
Cybertec | https://www.cybertec-postgresql.com




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

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