Re: Index for range queries on JSON (user defined fields)

2020-12-04 Thread Nick Cleaton
On Fri, 4 Dec 2020 at 15:39, Marco Colli wrote: > Hello! > > We have a multi-tenant service where each customer has millions of users > (total: ~150M rows). Now we would like to let each customer define some > custom columns for his users and then let the customer search his users > efficiently b

Re: PostgeSQL JSONB Column with various type of data

2020-12-04 Thread Michael Lewis
On Fri, Dec 4, 2020 at 9:21 AM Riswana Rahman wrote: > CREATE OR REPLACE FUNCTION jsonbNull(jsonb_column JSONB) > > returns boolean as $$ > > declare > > isPoint text := jsonb_typeof(jsonb_column) ; > > begin > > CASE isPoint > > WHEN 'arra

PostgeSQL JSONB Column with various type of data

2020-12-04 Thread Riswana Rahman
Hi Team, We are using Postgresql JSONB as storage type in our development. In the below table , RECORD column has JSONB data and we create a view which will derive the column "TEST_MV_2" from column "RECORD" as below CREATE OR REPLACE VIEW public."V_TEST_SELECT" AS SELECT a.recid,a.record

Index for range queries on JSON (user defined fields)

2020-12-04 Thread Marco Colli
Hello! We have a multi-tenant service where each customer has millions of users (total: ~150M rows). Now we would like to let each customer define some custom columns for his users and then let the customer search his users efficiently based on these columns. This problem seems really hard to sol

Re: Pg_locks and pg_stat_activity

2020-12-04 Thread aditya desai
Hi Justin, Thanks for your response. I suspect JDBC is using parameterized queries (postgres $1, $2, ..) and psql isn't (unless you type "prepare p AS SELECT ..." and execute p(.., .., ..)" Yes JDBC is using parameterized queries which get constructed dynamically depending upon user privileges in

Re: Pg_locks and pg_stat_activity

2020-12-04 Thread Justin Pryzby
On Fri, Dec 04, 2020 at 01:31:14PM +0530, aditya desai wrote: > Hi Justin, > Many thanks for your response. Please see my response below. > > What do you mean by API ? If it's a different client, how does it connect ? > Queries are getting called from Web UI built in Microservices spring boot. >

Re: Pg_locks and pg_stat_activity

2020-12-04 Thread aditya desai
Hi Kyotaro, Many thanks for the response. Will try and debug further. Have responded to Justin in another chain. Could you please check and advise if anything ? Regards, Aditya. On Fri, Dec 4, 2020 at 1:23 PM Kyotaro Horiguchi wrote: > At Fri, 4 Dec 2020 12:11:59 +0530, Ravikumar Reddy < > urra