Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1rsJEP-006Frk-UB for pgsql-sql@arkaria.postgresql.org; Thu, 04 Apr 2024 09:18:03 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1rsJEO-0019ey-VH for pgsql-sql@arkaria.postgresql.org; Thu, 04 Apr 2024 09:18:00 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1rsJEO-0019Xx-BA for pgsql-sql@lists.postgresql.org; Thu, 04 Apr 2024 09:18:00 +0000 Received: from mail-lf1-x132.google.com ([2a00:1450:4864:20::132]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1rsJEG-000VQD-OG for pgsql-sql@postgresql.org; Thu, 04 Apr 2024 09:17:58 +0000 Received: by mail-lf1-x132.google.com with SMTP id 2adb3069b0e04-516c08c25e1so898907e87.1 for ; Thu, 04 Apr 2024 02:17:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=reddoc.net; s=google; t=1712222271; x=1712827071; darn=postgresql.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=Tr1rDNucz9LXWlRHduUWL6TBJXwB4juAugoZxczS79A=; b=eVrD9EgA4u/KVS0f3W5iSNwr9DS+mqIm47L2YTy3ZNiFVmE1S2WTNdQnQ3eiLS4Pxd 1v9hvYO3QYDSvIPMWhlUt4/ZGz1sJ9pGqGh5cqQCxGBBxXmhy+oKNPQM38v+Z6Mj9c49 ymoxZeLUELhesalVsxUkwur+FAqcdpI3yRDzo= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1712222271; x=1712827071; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=Tr1rDNucz9LXWlRHduUWL6TBJXwB4juAugoZxczS79A=; b=Pz+85TWz2JBKJT+3VrTh/iP+pPXs+69eVBSX1WXUnSRyBjo7jU/0PN66sSmLfBrb21 1XM17fMuKdyQ8f865G0kQqe168Jed0NOc8+lXO05p4PzaZbBd8MiXrYm3RG1OAjIwiQx pjiQS6buRKCIf2ejMToBN71y67k38V43tJIRHNejtqh1s+gOASY+YClmyhRxRO743q1J JdtThS7ZplkI5EJaOSj+rxK7MnWd/9jaHZ00yJtLgwyFcbJRUZHJIwNYrD5j0KPKZDM2 ZdF9wc/mw/4WfMFV21fIeaox+NOSM8S/6r/0NzBsM2u8pbqXf8evxdHA9i0W6Jk/o+dM mmOQ== X-Forwarded-Encrypted: i=1; AJvYcCXK6kdVxDlam3zwjVE1uCLbc9hNIUUSrMp4OEvksECMXvjP51SlEcqwiEJB8EhCLu0LyS1VFxl9fvHeTDTZzqeb/h7NjabkWL8= X-Gm-Message-State: AOJu0YwLJ8zC+k307fkLBQGEIvm+JinpVBvE+P2/HFeA39zCrbE1YJFY 9xaDBx7CBvF+pu0wjttQrhJIVRhzjdsT2k8Xsml63mNHijSEva9r6wyb2iLZYgurqtNW/hAmxF1 GrRQU9USbQXgGpLoIiGLPAbbl4A9wP/8Ek94JHw== X-Google-Smtp-Source: AGHT+IE0GCorZSL6HdEwhrb3GGrJ5770oVCHtQ0k/E4mkEXhmrii6ydO4AIdHZL8IU+tOWk+4E2RX5mnHwTas72ZCOs= X-Received: by 2002:a19:5f19:0:b0:515:9dcd:22ae with SMTP id t25-20020a195f19000000b005159dcd22aemr1589632lfb.66.1712222270567; Thu, 04 Apr 2024 02:17:50 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Samed YILDIRIM Date: Thu, 4 Apr 2024 12:17:39 +0300 Message-ID: Subject: Re: postgres is slow on windows To: Jayadevan M Cc: Nazneen Mulani , pgsql-sql@postgresql.org Content-Type: multipart/alternative; boundary="00000000000036d4b7061541d04c" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --00000000000036d4b7061541d04c Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hello Nazneen, You compare two setups; one is PostgreSQL 14 on Windows and the other is PostgreSQL 15 on Linux. It is really hard to make a fair comparison and reach a conclusion. You, at least, need to have the same version of PostgreSQL version on both environments. Ideally, both PostgreSQL setup should be optimised for that specific environment and characteristics of the workload. Then, it would be possible to compare them. You can check what has been changed with PostgreSQL 15. You may want to check specifically performance improvements. =F0=9F=99=82 https://www.postgresql.org/docs/15/release-15.html Best regards. Samed YILDIRIM On Tue, 2 Apr 2024 at 13:37, Jayadevan M wrote: > > > On Tue, Apr 2, 2024 at 2:54=E2=80=AFPM Nazneen Mulani > wrote: > >> #A description of what you are trying to achieve and what results you ex= pect.: >> >> >> I have installed Postgres 14 on my local laptop which is new hardware gi= ven by organization. >> >> HP EliteBook >> >> Processor 13th Gen Intel(R) Core(TM) i7-1370P 1.90 GHz >> >> Installed RAM 32,0 GB (31,6 GB usable) >> >> System type 64-bit operating system, x64-based processor >> >> OS : Windows 11 Enterprise >> >> >> >> When I am running query on local database hosted on my laptop it run ver= y slow approx. 7 sec time it takes. >> >> >> >> While Same replica db is present on server where Postgres 15 is being us= ed. The query execution time is 1 to 2 sec. I am running these queries with= DBeaver from laptop. >> >> >> >> I wanted to understand what is the difference in windows postgres setup = which is causing this delay? >> >> >> >> #PostgreSQL version number you are running: Postgres 14 on local windows= OS. >> >> >> >> >> >> #How you installed PostgreSQL: With the Organization Software Centre. >> >> >> >> #Changes made to the settings in the postgresql.conf file*: * >> >> Refer attachment >> >> >> #Operating system and version: Windows 11 Enterprise >> >> >> >> #What program you're using to connect to PostgreSQL: DBeaver >> >> #Is there anything relevant or unusual in the PostgreSQL server logs?: = No >> >> #For questions about any kind of error: No >> >> >> >> #What you were doing when the error happened / how to cause the error: >> >> No at all, but I had run generet_series() on another schema to have rand= om data in tables. >> >> >> Regards, >> Nazneen >> > I would suggest comparing the query plan for both environments. - > https://www.postgresql.org/docs/current/sql-explain.html > > May be shared_buffers is high enough on the server and not so on your > laptop - just a guess. > > Regards, > Jayadevan > --00000000000036d4b7061541d04c Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hello Nazneen,

You compare t= wo setups; one is PostgreSQL 14 on Windows and the other is PostgreSQL 15 o= n Linux. It is really hard to make a fair comparison and reach a conclusion= . You, at least, need to have the same version of PostgreSQL version on bot= h environments. Ideally, both PostgreSQL setup should be optimised for that= specific environment and characteristics of the workload. Then, it would b= e possible to compare them.

You can check what= has been changed with PostgreSQL 15. You may want to check specifically pe= rformance improvements. =F0=9F=99=82

B= est regards.
Samed YILDIRIM

=

= On Tue, 2 Apr 2024 at 13:37, Jayadevan M <maymala.jayadevan@gmail.com> wrote:


On Tue, Apr 2, 2024 at 2:54=E2=80=AFPM Nazneen Mulani <naz18mulani@gmail.com&= gt; wrote:
#A description=
 of what you are trying to achieve and what results you expect.:<=
/u>

I =
have installed Postgres 14 on my local laptop which is new hardware given b=
y organization.
HP EliteBook<=
u>
Processor=C2=A0=C2=A0=C2=A0=
=C2=A0=C2=A0=C2=A0 13th Gen Intel(R) Core(TM) i7-1370P=C2=A0=C2=A0 1.90 GHz=
Installed RAM=C2=A0=C2=A0 32=
,0 GB (31,6 GB usable)
System=
 type=C2=A0=C2=A0=C2=A0=C2=A0 64-bit operating system, x64-based processor<=
u>
OS : Windows 11 Enterprise=
=C2=A0
When I am running query on local database hosted on m=
y laptop it run very slow approx. 7 sec time it takes.=
=C2=A0
While Same replica d=
b is present on server where Postgres 15 is being used. The query execution=
 time is 1 to 2 sec. I am running these queries with DBeaver from laptop. 
=C2=A0
I wanted to understand what is the di=
fference in windows postgres setup which is causing this delay?
=C2=A0
#PostgreSQL version number you are running: Postgres 14 on local windows OS.=
=C2=A0
=C2=A0
#How you installed=
 PostgreSQL: With the Organization S=
oftware Centre.
=C2=A0=
#Changes made to the settings in th=
e postgresql.conf file:=C2=A0 
=C2=A0Refer attachment

=
#Operating system and version: Windows =
11 Enterprise
=C2=A0
#What program you're using to con=
nect to PostgreSQL: DBeaver
 
#Is there anything relevant or unusual in the PostgreSQL serv=
er logs?: No
 
#For questions about any kind of error:<=
/span> No
=C2=A0
#What you=
 were doing when the error happened / how to cause the error:=
No at all, but I had run generet_series() =
on another schema to have random data in tables.
=

=C2=A0

Regards,
Nazneen
I would suggest comparing the q= uery plan for both environments. -=C2=A0

M= ay be shared_buffers is high enough on the server and not so on your laptop= - just a guess.

Regards,
Jayadevan=C2= =A0
--00000000000036d4b7061541d04c--