Re: [RM2522] Improve grid/column select all operation - Mailing list pgadmin-hackers

From Dave Page
Subject Re: [RM2522] Improve grid/column select all operation
Date
Msg-id CA+OCxoytArEAzn6WzX6UB7+=1jb-G4zU-fbeoLt8pA8JhggjPw@mail.gmail.com
Whole thread Raw
In response to Re: [RM2522] Improve grid/column select all operation  (Harshal Dhumal <harshal.dhumal@enterprisedb.com>)
Responses Re: [RM2522] Improve grid/column select all operation  (Murtuza Zabuawala <murtuza.zabuawala@enterprisedb.com>)
List pgadmin-hackers
Hi

On Thursday, June 29, 2017, Harshal Dhumal <harshal.dhumal@enterprisedb.com> wrote:


On Thu, Jun 29, 2017 at 4:33 PM, Harshal Dhumal <harshal.dhumal@enterprisedb.com> wrote:
Hi,

Please find attached patch for RM2522.

With this patch grid/column select all time is reduce to ~1 second from 8-10 seconds.
This benchmarking is performed with 100k rows and 2 columns (int, text).

I see very little improvement (~15s to 14s). My test case has  108786 rows in it, and is generated from the query:

select * from pg_class c, pg_attribute a where c.oid = a.attrelid
union all
select * from pg_class c, pg_attribute a where c.oid = a.attrelid
union all
select * from pg_class c, pg_attribute a where c.oid = a.attrelid
union all
select * from pg_class c, pg_attribute a where c.oid = a.attrelid

Maybe the number of columns has something to do with it?

AND... I'm still left with nothing being copied to the clipboard (the main issue by the way, which no patch for this so far seems to have tackled).

Thanks.


 

The solution was to use simple array concatenation instead of underscore union while getting index of all selected complete rows.
Underscore union function is only useful when user selects different ranges from grid and those ranges overlaps. In this case union function removes duplicate (overlapped) rows.
However result grid in sqleditor do not support overlapped row selection so we can simply cancat rows from different ranges without worrying about overlapped row selection.



-- 
Harshal Dhumal
Sr. Software Engineer

EnterpriseDB India: http://www.enterprisedb.com
The Enterprise PostgreSQL Company



--
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake

EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

pgadmin-hackers by date:

Previous
From: Matthew Kleiman
Date:
Subject: Re: [pgadmin-hackers] Invitation to a Community Developer Forum
Next
From: Ashesh Vashi
Date:
Subject: Re: [pgadmin-hackers] Declarative partitioning in pgAdmin4