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 1lCNWi-0000dG-Fk for pgsql-general@arkaria.postgresql.org; Wed, 17 Feb 2021 14:10:00 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1lCNWh-0005NH-6k for pgsql-general@arkaria.postgresql.org; Wed, 17 Feb 2021 14:09:59 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lCNWg-0005Kg-SJ for pgsql-general@lists.postgresql.org; Wed, 17 Feb 2021 14:09:58 +0000 Received: from sonic312-19.consmr.mail.sg3.yahoo.com ([106.10.244.209]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1lCNWd-0004Qw-H7 for pgsql-general@lists.postgresql.org; Wed, 17 Feb 2021 14:09:58 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1613570989; bh=A9AHaTyKVC4sPj0ER7EDkhu+0glHfACfg5OjTupM46s=; h=Date:From:Reply-To:To:Cc:In-Reply-To:References:Subject:From:Subject:Reply-To; b=EDRtM9l7QpQ8laq80LDqqORoKLd3e5CKMFVyA5b7Mqh+GP70zHR3QtD9kp8cMD3L9uQpIaWB24CSznS1OawWMWEUas8uAT8ADv0IKEdzrZgXC7w2LiW3GluV5V0Qx5H9wmq6WvoNKNfoogBr9Z1kEBbnxW/EvZSkBGNf4acwhJ7PaKix3Ioiz1f6cHygZVKP38mcAEg0jaVFaEGYSttrfg0CiilXYKaKlUU9/qzhGKuvTMD3CgULdcOwV6NfDMgf368moNkWmPilQUuHOck79cbEHlTNF7bVnOu2hZvww3QwwENbahlkffkRjrIWdD11EjHX2pqRoO0KI/z59VwVDw== X-SONIC-DKIM-SIGN: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1613570989; bh=sLEvgH6RR0PgA7fazpN/W3F3NZuGZ2zcPzEzOuyZdU2=; h=X-Sonic-MF:X-Sonic-MF:Date:From:To:Subject:From:Subject; b=tJ94i40bXcfCfd37RDZwOZ9bgXP+o8uq+6MQbnBc8X5LVlf1hevI00EgFgwl1VW2tYNGqN3UVsTt5LXi2vTwQCStm6OYUE0O9fBx8ap8RLDzKlUj1wJEa4nfBJezDY7PE1XnG9f2LNFjY4dwcVUX7gzdu+rgG3pg6R2LZG0HpJH/72vPp7pBD68+xbwc0uCv1qFSTVWgOEBEPazWo76LAVZGaIycnL+hDuPrCyIxaEfGnppS89O07Ppa41Qm9yitbFWEeH5a7C/58AJaDzkPVXWyIwyLW4vBI9kURpklpQZeXtZk1IBeGAEokFjJV5wHGm0dyfQT90W5WYsHiO1Nmw== X-YMail-OSG: OI.QH5IVM1mTGZZ0EuhvTQ7L.VqfuuXuTq8exVtR0dg7N5bVYOuKQbYJ2JwI3Mi CRFMx9wgOeWghfpbmR4nDdxNd4G4GhSYVQNuJuMM9u4v7tfnv5Sm8_1Fwo0XC3rWIkb5ZB2MQoWd 4PLQRvwisddHQsOnNzX0969xxruqfVOhko.ZGbhUhTgzVHpULWeYQuejhZTKai5U5227.SXwc13Z IObS_lqWw75UgudN55HAEc7XJ0880mAjBhzPSHQJb.PblXg3fqqTjkLMK3KSPsfHdFiWd8PGnxiu 7RdGhnuBYrugTBiPSI5vHjALnjII4pwzhP6g5Fl7fntPxX6kID0tWJgRHHf438o8i5noWbLzMpZx gFFp81PcW7lbU40GfkWIa.TjEcB6HVzNhHNEuSs5lSXPDxboFTKzwLsC9aiY.p7y0ZQYeRJkMtkN tL5Q7ZGcJJUhFWv3gec.KRo9DBEF10uuba8jvVdziHEjkaQ1temz.XoEiZV.pOSe6KU3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GNBKIOe8y_LtdwebH5Kw1ti_YGJ6eIe3ZYAi6_yfKD X-Sonic-MF: Received: from sonic.gate.mail.ne1.yahoo.com by sonic312.consmr.mail.sg3.yahoo.com with HTTP; Wed, 17 Feb 2021 14:09:49 +0000 Received: by smtp418.mail.gq1.yahoo.com (VZM Hermes SMTP Server) with ESMTPA ID 91c07da4fe2498832b639d0b9f2ca5fc; Wed, 17 Feb 2021 14:09:44 +0000 (UTC) X-YMail-OSG: 1sGLeXUVM1li6tCWLP4NZcSefsu2pJ619aLYYw.cfRfNkk8fjg1vMlb_lsJMyIQ 1pbpocGnS.N3itiYZ54P7DvNyhyZt0wWOLGaNscNEjXOmb8JqQvGt87hZzo5PvHFj1DBTPK4kycE 8Um8RQ.AXGfS2GIczsVfZmOggtx7M23.G4avRwwNY_1WS3MwWVwWT7D5krZ7ugZrN.sXEza2JlOz o4DGfnmW.FX3nLBS5_S7USeWmb3KpUVmUSaKBOIWd298jQ6dlLS.shelxEOD2NwsiaZ92Z4cHc6n J6m6QAYU3qbvbE6mPmBlIMG49HkIFhdldNjPbYE4EvzSsOAS3HEZDTt_dQoSibMVIbO.ojzKLhuL ohPntekmhT8knK1ERPkqxevnO5kckur79a4oGKI85ahjuKafSIckSMGBQ2kH3Td2H38dzoi4VVim OMFjSKj06q8PydFu5Ii7uH3PwHtUz36gH5PTfVPm1borf6fA2OOwC7VgYssFklzSYT.kkSi8Jpr1 mx3ylqMX9qtFghQOVHGR..g7lLAshHaqLTnxn3wqbiavBEFVXu6Y04EU_QXM7G3Z2WIfUJXWegpP 06aJgTIxw6hU.wL2mRJwjAhzF1Q7dNAR2xM2odXyYV58VhMrF61AsCC2hODSYZ.C6dea_VOEBS64 j0B2XBOPO8G43Ka4oqxeLay48VSo3uIkYFpD.bZGgdh1hziNQyGh3_.4MC84AytciOxVuOjP9N8d 5bwR3aOtkFyqwWSHic9Siiy.W2gAo1iNRstCcfwsvkiWOPXbEIwIp94tFB3S6ZNoqE52HECBhCcj Ezcr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tkrsmZBoNcWpkQPIJe.YMAO5JNmMR8GYi51UmM7lrlBxnG6s9PP9Botv. Xggv7pxhPu9yBlGAGVNTJ06scuNdUMPIg_vaaBWtHpyArsQl.ezfOS4olDtY.M3QaQSfWJHW3yAN XarrhkgcOZHOfNWLa4rHDRLKXjkcEZ_2JuxXQB_ty3_OkzGBdxrmqbWH38U_6VNZhQdDiVVuz.zR zF8p5M0hplxq1NUOrNVP6lUGn_ADDnrLx9tQ89j3HHSyyZk7grbraMFodLSvOhrR_UCEEfQz.X.Z TahuV7BjTpge8hegQ4cTiJnNHw1FkjB6p5yaMTxugt1GrALq0b0I3kg0.kghhhFtQmoe0UHM4F4r 21DjqupmpthQmf8HGR6McB1T3prq5KOS2AY.oo1YmTNDJChvzSd_bzvdVwVnHHxxrkyZ7.NtLl_b 5rdFcwMMYgj_vX0H7KVoc80K_pwBnU0FuVu8P8O1EVSf1Hqgi0BseNPQveHepuXJagIwHVBYWIDF ihapuDIIsequ.qR0EpdWWtUq5h2tIR9B2Piz5E_hyslRr_NzOlp1nvbPAXS5vtg3qWnc8HJa_His 5_2eTRR9JbVzbZsJTt138aw2uYxG4SdV94DqFxQUjfjP0Gz97Uvtv8lN_axHGXQYd1xuWFmsZvj3 f4E7VLpxvhQnLmRUKjXtBw7e4uRc9QhlBCqULd7eSaKCg3jCinD8YzXrysCvvju1UV03QvbGrt1q 5yleKke2JYH8oC2FZFaXkkSuzUKO78IPdFNu8O5hVbohCSVIrVs2Eqs9Y2cNNP6b1UsKsYoShGTR r1GNEn074xomLsQ-- X-Sonic-MF: Received: from sonic.gate.mail.ne1.yahoo.com by sonic313.consmr.mail.gq1.yahoo.com with HTTP; Wed, 17 Feb 2021 14:09:42 +0000 Date: Wed, 17 Feb 2021 14:09:38 +0000 (UTC) From: "sivapostgres@yahoo.com" Reply-To: "sivapostgres@yahoo.com" To: Benedict Holland Cc: pgsql-general , Thomas Kellerer Message-ID: <1960558743.2113146.1613570978228@mail.yahoo.com> In-Reply-To: References: <1671732859.1031650.1613563275311.ref@mail.yahoo.com> <1671732859.1031650.1613563275311@mail.yahoo.com> <951d8c4c-369d-63b3-f323-83660d96276f@gmx.net> <1566185888.2096515.1613568453936@mail.yahoo.com> Subject: Re: Slow while inserting and retrieval (compared to SQL Server) MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_2113145_397702400.1613570978226" X-Mailer: WebService/1.1.17712 YMailNorrin Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.182 Safari/537.36 Content-Length: 9733 List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk ------=_Part_2113145_397702400.1613570978226 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable So far no performance tuning done for sql server.=C2=A0 It works fine for = the load. Even the express edition which is free, works better.=C2=A0 I don= 't think postgres will be so slow to insert such a low number of records in= an empty database.=C2=A0 =C2=A0 I'll be preparing the required sql statements to insert those records in pg= admin and see the timings, tomorrow. On Wednesday, 17 February, 2021, 07:29:29 pm IST, Benedict Holland wrote: =20 =20 Sql server is a 10k dollar to 1 million dollar application (or more) that = is specifically optimized for windows and had limited to no support anywher= e else. Postgres is free and from my experience, comes within 5% of any oth= er dbms. Inserting 1 row at a time with auto commit on will be a bit slow b= ut it shouldn't be noticeable. What times are you seeing if you do this wit= h pgadmin4 compared to sql server? Also, have you done any performance tuni= ng for postgres server? There are many documents detailing performance tuni= ng your servers, like you probably did, at some point, with your sql server= .=C2=A0 Thanks,Ben On Wed, Feb 17, 2021, 8:28 AM sivapostgres@yahoo.com wrote: We use datawindows.=C2=A0 Datawindows will send the required DML statement= s to the database.=C2=A0 And it sent in format 1 .=C2=A0= =C2=A0 IN start of the application, Autocommit set to True.Before update of any ta= ble(s)Autocommit is set to FalseInsert/Update/Delete recordsIf success comm= it else rollbackAutocommit is set to True This has been followed for decades and it's working fine with Sql server.= =C2=A0 =C2=A0 Here we are trying to insert just 10 records spread across 6 tables, which = is taking more time.. that's what we feel.=C2=A0 =C2=A0The similar work in = SQL Server takes much less time < as if no wait is there >.=C2=A0=C2=A0 On Wednesday, 17 February, 2021, 06:48:35 pm IST, Thomas Kellerer wrote: =20 =20 sivapostgres@yahoo.com schrieb am 17.02.2021 um 13:01: > To populate some basic data we try to insert few records (max 4 > records) in few tables (around 6 tables) from one window.=C2=A0 We feel > that the insert time taken is longer than the time taken while using > Sql Server.=C2=A0 We tested almost a similar window that updated the > similar table(s) in SQL server, which was faster.=C2=A0 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. Are you doing single-row inserts like: =C2=A0 =C2=A0 insert into ... values (..); =C2=A0 =C2=A0 insert into ... values (..); =C2=A0 =C2=A0 insert into ... values (..); =C2=A0 =C2=A0 insert into ... values (..); or are you doing multi-row inserts like this: =C2=A0 =C2=A0 insert into ... values (..), (..), (..), (..); Typically the latter will perform much better (especially if autocommit is = enabled) =20 =20 ------=_Part_2113145_397702400.1613570978226 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
So far no performance tuning= done for sql server.  It works fine for the load. Even the express ed= ition which is free, works better.  I don't think postgres will be so = slow to insert such a low number of records in an empty database.  &nb= sp;

I'll be preparing the required sql statements to inse= rt those records in pgadmin and see the timings, tomorrow.


=20
=20
On Wednesday, 17 February, 2021, 07:29:29 pm IST, Bened= ict Holland <benedict.m.holland@gmail.com> wrote:


Sql server is a 10= k dollar to 1 million dollar application (or more) that is specifically opt= imized for windows and had limited to no support anywhere else. Postgres is= free and from my experience, comes within 5% of any other dbms. Inserting = 1 row at a time with auto commit on will be a bit slow but it shouldn't be = noticeable. What times are you seeing if you do this with pgadmin4 compared= to sql server? Also, have you done any performance tuning for postgres ser= ver? There are many documents detailing performance tuning your servers, li= ke you probably did, at some point, with your sql server. 

Thanks,
Ben

=
On Wed, Feb 17, 2021, 8:28 AM sivapostgres@yahoo.com &l= t;sivapostgres@yahoo.com> wrote:
We use datawindows.  Datawindows will send th= e required DML statements to the database.  And it sent in format 1 &l= t;single row update>.  

IN start of the application, Autocommit set to Tr= ue.
Before update of any table(s)
Autocommit is set to False
Insert/Update/Delete re= cords
If success commit else rollback
Autocommit is set to True

This has been followed for decades and it's working= fine with Sql server.   

Here we are trying to insert just 10 records sprea= d across 6 tables, which is taking more time.. that's what we feel.  &= nbsp;The similar work in SQL Server takes much less time < as if no wait= is there >.  

=20
=20
On Wednesday, 17 February, 2021, 06:48:35 pm IST, Thoma= s Kellerer <shammat@gmx.net> wrote:


sivapostgres@yahoo.com schrie= b am 17.02.2021 um 13:01:

> To populate some basic data we try to inser= t few records (max 4
> records) in few tables (around = 6 tables) from one window.  We feel
> that the in= sert 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.&n= bsp; With Postgres
> database, we need to wait for a c= ouple of seconds before the
> insert/update is over, w= hich we didn't feel in Sql Server.



Are you doing single-row inserts like:

    insert into ... values (..);
    insert into ... values (..);
&nbs= p;   insert into ... values (..);
    inse= rt into ... values (..);

or are you do= ing multi-row inserts like this:

 = ;   insert into ... values (..), (..), (..), (..);
<= br clear=3D"none">Typically the latter will perform much better (especially= if autocommit is enabled)




------=_Part_2113145_397702400.1613570978226--