RE: Postgres not using index on views

2020-04-20 Thread Rick Vincent
ql.org<mailto:pgsql-performa...@postgresql.org>; Manoj Kumar mailto:manojku...@temenos.com>>; Herve Aubert mailto:haub...@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 in

RE: Postgres not using index on views

2020-04-17 Thread Rick Vincent
pril 7, 2020 11:08 AM To: 'Tom Lane' mailto:t...@sss.pgh.pa.us>>; Justin Pryzby mailto:pry...@telsasoft.com>> Cc: pgsql-performa...@postgresql.org<mailto:pgsql-performa...@postgresql.org>; Manoj Kumar mailto:manojku...@temenos.com>>; Herve Aubert mailto:haub...@temen

RE: Postgres not using index on views

2020-04-17 Thread Rick Vincent
org; Manoj Kumar ; Herve Aubert 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. CREATE OR REPLACE FUNCTION extractValueJS (sVar

Re: Postgres not using index on views

2020-04-07 Thread Thomas Kellerer
> RV>> It simply is the way the application stores the data. For Oracle > we are storing in XML and JSON format, for postgres, due do > limitations of XML api, we are storing in VARCHAR. Why not use JSON in Postgres then? Postgres' JSON functions are at least as powerful as Oracle's (if not bette

Re: Postgres not using index on views

2020-04-07 Thread Thomas Kellerer
Rick Vincent schrieb am 07.04.2020 um 11:08: > The function is defined as below, so no use of VOLATILE. If you don't specify anything, the default is VOLATILE. So your function *is* volatile.   > CREATE OR REPLACE FUNCTION extractValueJS (sVar text, nfm INTEGER, nvm > INTEGER) > RETURNS VARCHAR

RE: Postgres not using index on views

2020-04-07 Thread Rick Vincent
assubclass reloptions pg_table_size FBNK_CURRENCY 6 93 0 r 2 false NULL81920 Version is: PostgreSQL 11.7 (Debian 11.7-2.pgdg90+1) on x86_64-pc-linux-gnu, compiled by gcc (Debian 6.3.0-18+deb9u1) 6.3.0 20170516, 64-bit It is a postgres docker image. Than

RE: Postgres not using index on views

2020-04-07 Thread Rick Vincent
ly slow. Thanks, Rick -Original Message- From: Justin Pryzby Sent: Tuesday, April 7, 2020 6:59 AM To: Rick Vincent Cc: pgsql-performa...@postgresql.org; Manoj Kumar ; Herve Aubert Subject: Re: Postgres not using index on views On Mon, Apr 06, 2020 at 02:19:59PM +, Rick Vincent

Re: Postgres not using index on views

2020-04-06 Thread Laurenz Albe
On Mon, 2020-04-06 at 14:19 +, 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

Re: Postgres not using index on views

2020-04-06 Thread Tom Lane
Justin Pryzby writes: > On Mon, Apr 06, 2020 at 02:19:59PM +, Rick Vincent wrote: >> The following query takes an extremely long time for only 180 rows, and what >> this means is that we would have to index anything appearing in the where >> clause for every table in order to use views becau

Re: Postgres not using index on views

2020-04-06 Thread Justin Pryzby
On Mon, Apr 06, 2020 at 02:19:59PM +, 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. > > A table is created as: > > CREATE TABLE "FBNK_CUSTOMER" (RECID VARCHAR(255) NOT NULL PRIMAR