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