Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lCLaF-0002Yr-TI for pgsql-general@arkaria.postgresql.org; Wed, 17 Feb 2021 12:05:31 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1lCLaE-0000zu-QK for pgsql-general@arkaria.postgresql.org; Wed, 17 Feb 2021 12:05:30 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lCLaE-0000rW-Hz for pgsql-general@lists.postgresql.org; Wed, 17 Feb 2021 12:05:30 +0000 Received: from mxh02aws156.mxout.inova.com.br ([34.199.21.156] helo=mxhero02.a.inova.com.br) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lCLa5-0002Pr-H7 for pgsql-general@lists.postgresql.org; Wed, 17 Feb 2021 12:05:29 +0000 Received: from localhost (localhost [127.0.0.1]) by mxhero02.a.inova.com.br (Postfix) with ESMTP id D682A191AF4 for ; Wed, 17 Feb 2021 12:05:17 +0000 (UTC) Received: from corpmoutpolicyd01.a.inova.com.br (ip-10-0-1-88.ec2.internal [10.0.1.88]) by mxhero02.a.inova.com.br (Postfix) with ESMTP; Wed, 17 Feb 2021 12:05:17 +0000 (UTC) Received: from corpmoutpolicyd01.a.inova.com.br (localhost [127.0.0.1]) by corpmoutpolicyd01.a.inova.com.br (Postfix) with ESMTP id C793C220620; Wed, 17 Feb 2021 10:05:15 -0200 (BRST) Received: from corpmout01.a.inova.com.br (ip-10-0-1-125.ec2.internal [10.0.1.125]) by corpmoutpolicyd01.a.inova.com.br (Postfix) with ESMTP id BFB35C29E5; Wed, 17 Feb 2021 10:05:15 -0200 (BRST) Received: from corpmbox02.a.inova.com.br (ip-10-0-4-158.ec2.internal [10.0.4.158]) by corpmout01.a.inova.com.br (Postfix) with ESMTP; Wed, 17 Feb 2021 09:05:15 -0300 (-03) Date: Wed, 17 Feb 2021 09:05:15 -0300 (BRT) From: luis.roberto@siscobra.com.br To: sivapostgres@yahoo.com Cc: pgsql-general Message-ID: <871844152.5278987.1613563515397.JavaMail.zimbra@siscobra.com.br> In-Reply-To: <1671732859.1031650.1613563275311@mail.yahoo.com> References: <1671732859.1031650.1613563275311.ref@mail.yahoo.com> <1671732859.1031650.1613563275311@mail.yahoo.com> Subject: Re: Slow while inserting and retrieval (compared to SQL Server) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Originating-IP: [10.0.1.247] X-Mailer: Zimbra 8.8.15_GA_3980 (ZimbraWebClient - GC88 (Win)/8.8.15_GA_3980) Thread-Topic: Slow while inserting and retrieval (compared to SQL Server) Thread-Index: cyweK+z2/l1dVlYR0MsC43tSEYCnyg== x-mxHero-Origin-Ip: /127.0.0.1:53682 X-mxHero-AttachmentBlock: rule=48;result=false List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk ----- Mensagem original ----- > De: sivapostgres@yahoo.com > Para: "pgsql-general" > Enviadas: Quarta-feira, 17 de fevereiro de 2021 9:01:15 > Assunto: Re: Slow while inserting and retrieval (compared to SQL Server) > > Hello, > > Using Postgres 11 in Windows Server 2012 & Powerbuilder > Working from the same machine where Postgres 11 is installed. So no chance for any network issue, I feel. > No setup/config change done. Just working with all the default settings. > With no data in any of the 179 tables in that database. > > To populate some basic data we try to insert few records (max 4 records) in few tables (around 6 tables) from one window. We feel that the insert time taken is longer than the time taken while using Sql Server. We tested almost a similar window that updated the similar table(s) in SQL server, which was > > faster. With Postgres database, we need to wait for a couple of seconds before the insert/update is over, which we didn't feel in Sql Server. > > I feel that some changes in settings might improve this speed, but with not much knowledge in Postgres I struggle to find out those setup values. > > Any help in improving the speed is really appreciated. > > Happiness Always > BKR Sivaprakash Can you run EXPLAIN (ANALYZE,BUFFERS) on the INSERT command and post the results here? Usually inserting this many records should be instantaneous.