Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1igqMn-00054m-BV for pgadmin-hackers@arkaria.postgresql.org; Mon, 16 Dec 2019 13:24:53 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1igqMm-0007h8-7W for pgadmin-hackers@arkaria.postgresql.org; Mon, 16 Dec 2019 13:24:52 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1igqMl-0007gW-PC for pgadmin-hackers@lists.postgresql.org; Mon, 16 Dec 2019 13:24:52 +0000 Received: from mail-io1-xd30.google.com ([2607:f8b0:4864:20::d30]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1igqMj-0001ji-Fd for pgadmin-hackers@postgresql.org; Mon, 16 Dec 2019 13:24:50 +0000 Received: by mail-io1-xd30.google.com with SMTP id a22so6911517ios.3 for ; Mon, 16 Dec 2019 05:24:49 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=enterprisedb-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=pgoUZIOLgLw+A+hbIYVeEXTMSPJ1yrCb5kS51wCdIBk=; b=j3+AGXiRk/PgAHEzZLZLzDv1Jxy0ZgaJ7NG1lFZjj48U0fYqzXMzyZO/tZRdz5F2i6 SRkCwCljlEKoqbi5cxx0XseIAcPiOZXUnQ/JGk8kj1vtg1CMPehqgLb2On6GUJF5HhVa hmF/QvcbbqBw3bduJYosZC71S43wdTQMPgriTQhzndh0V0t5Zw/QVgh2S7txb/ku6IYo gxCvIqWspztVBTJwk+NBizAAYXBJ+4hrukDsKjAsTqJLrP7z69EtVT5ZBxqHZDtuETei +ebCb/jhHzBwFgiABsh/36ymAZw1I6TC+I+dhBepIvVvzIFAUfYlf1fhlT4JL1iWPUgw 1Bhg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=pgoUZIOLgLw+A+hbIYVeEXTMSPJ1yrCb5kS51wCdIBk=; b=kO5ibq3EJcN5pOM9XXPnVXbpqIayUw0VmmHazWOaekbu1D4qxda7ulKMy2x+tso74v CqiolxyalrYi/JNHZ2jLrQJhAQoAy1mCqvE14u7KJXbNEOO9flCoeeBojF6fcTdhb44+ OwShk7e62GftutxGlLzY95cjfikmQsqcCqGVHnski+ii2CrFjlLRz+1a9qjEMoZWu2nF pN/IZjq+ptFLeWigr0CqVKYYaRduqcIcbQZGh11bzZHNuJQq7MvLtrHqUMBZwWPd6BFf 0nN6VSxqOGEGMhr0XyLgVxF1gDQqYIvy3byWF4E+2BcUgoWmscfRbsuPfGkQrrHyT4Rh Q4Xw== X-Gm-Message-State: APjAAAWk7Vg2WZaSX2if9fJTDRBldS3iubJD3ZxnAqX2fH31QhX/DQpH pY7wFeBYl15NMlAa4Uen69AVW/LDe/d7vZA26OtGbt9VBOlqmoVyklwzSPK9FMqvbunZqL1ZyAG g1I7VS7mZm1025/ccKSGzzh//1sYvQI76JanaepnWVXA12qtNyhboxkPwhFJVQDtElcpybPwrNE 9mKyCFLCok7pQpcctWP+tu01IAQLjg3qC64u5ZwJizn0fWnocaex4= X-Google-Smtp-Source: APXvYqy3JvRas3aHdGdGIHkS4O975eR32Xd24n06gjkaWqhTPkqWBHrkfQs9Ee6TZYkpFxOCVWBC/8uDJwOmBX8KdJo= X-Received: by 2002:a02:13c2:: with SMTP id 185mr11995219jaz.0.1576502687858; Mon, 16 Dec 2019 05:24:47 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: From: Akshay Joshi Date: Mon, 16 Dec 2019 18:54:36 +0530 Message-ID: Subject: Re: [pgAdmin][RM4988] Refactoring of all the SQL files used by pgAdmin4 To: Aditya Toshniwal Cc: pgadmin-hackers Content-Type: multipart/alternative; boundary="000000000000b29d4d0599d222e7" X-CLOUD-SEC-AV-Info: edb,google_mail,monitor X-CLOUD-SEC-AV-Sent: true X-Gm-Spam: 0 X-Gm-Phishy: 0 List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk --000000000000b29d4d0599d222e7 Content-Type: text/plain; charset="UTF-8" Thanks, patch applied. On Mon, Dec 16, 2019 at 5:40 PM Aditya Toshniwal < aditya.toshniwal@enterprisedb.com> wrote: > Hi Hackers, > > Attached patch which is related to RM4988, reduces the number of hits to edit_mode_types.sql > (an expensive one). > Currently, this is query is executed for every column one by one when > table properties dialog is opened. I've added edit_mode_types_bulk.sql, > which will fetch the edit types for all the distinct column types used in > the table in a single DB trip and use that data for each column. > Also, while generating RE-SQL for columns, edit_mode_types.sql will not > be executed. > This will definitely reduce time. > > Kindly review. > > -- > Thanks and Regards, > Aditya Toshniwal > Sr. Software Engineer | EnterpriseDB India | Pune > "Don't Complain about Heat, Plant a TREE" > -- *Thanks & Regards* *Akshay Joshi* *Sr. Software Architect* *EnterpriseDB Software India Private Limited* *Mobile: +91 976-788-8246* --000000000000b29d4d0599d222e7 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Thanks, patch applied.

On Mon, Dec 16, 2019 at 5:40 PM Adit= ya Toshniwal <adity= a.toshniwal@enterprisedb.com> wrote:
Hi Hackers,

Attach= ed patch which is related to RM4988, reduces the number of hits to=C2=A0edit_mode_types.sql= (an expensive one).
Currently, this is query is executed for eve= ry column one by one when table properties dialog is opened. I've added= =C2=A0edi= t_mode_types_bulk.sql, which will fetch the edit types for all the distinct= column types used in the table in a single DB trip and use that data for e= ach column.
Also, while generating RE-SQL for columns,=C2=A0edit_mode_types.sql will not be= executed.
This will definitely reduce time.

Ki= ndly review.

--
Thanks and Regards,
Aditya Toshniwal
Sr. Software Engineer |=C2=A0Ente= rpriseDB India |=C2=A0Pune
"Don't Complain about Heat, Plant a TREE"<= /div>


--
Thanks & Regards
=
Akshay Joshi
Sr. Software Architect
EnterpriseDB Software India Private Limited
=
Mobile: += 91 976-788-8246
--000000000000b29d4d0599d222e7--