pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Mikkel Lauritsen <renard@tala.dk>
To: David Rowley <dgrowleyml@gmail.com>
Cc: pgsql-performance <pgsql-performance@postgresql.org>
Subject: Re: Windows slowness?
Date: Thu, 11 Jun 2020 07:05:50 +0200
Message-ID: <9c05b2302f277afd0ced7e74a96ca5a7@tala.dk> (raw)
In-Reply-To: <CAApHDvp5Jn6ZWgSogKhS3skCmCmJ4rb-jAPktek03dcpD3QHaA@mail.gmail.com>
References: <db3f5345af6b95330b2a51fbebbb0f02@tala.dk>
	<CAApHDvp5Jn6ZWgSogKhS3skCmCmJ4rb-jAPktek03dcpD3QHaA@mail.gmail.com>

Hi David,

Many thanks for your response - you wrote:

On 2020-06-10 23:08, David Rowley wrote:
> On Thu, 11 Jun 2020 at 07:41, Mikkel Lauritsen <renard@tala.dk> wrote:
>> I have a query that runs much slower in Postgres on Windows than on
>> Linux
> 
>> Using explain analyze on the database running on Windows I get
>> 
>> ->  Index Scan using event_pkey on event t1  (cost=0.56..0.95 rows=1
>> width=295) (actual time=0.075..0.075 rows=0 loops=229227)
> 
>> If I copy the database to my laptop running Linux (Postgres 12 on 
>> Fedora
>> 32, i7-9750H, 16 GB ram) I get the exact same execution plan. Explain
>> analyze says
>> 
>> ->  Index Scan using event_pkey on event t1  (cost=0.56..0.95 rows=1
>> width=295) (actual time=0.008..0.008 rows=0 loops=229227)

--- snip ---

> Can you confirm what: SELECT pg_relation_size('event_pkey'),
> pg_relation_size('event'); says on each

1011384320 and 2753077248, respectively.

--- snip ---

> It would be good to see:
> 
> SET track_io_timing = on;
> EXPLAIN (ANALYZE, BUFFERS) <the query>

I wasn't aware of that tracing option - thanks! For this particular plan 
entry the output is

  Buffers: shared hit=896304 read=257234
  I/O Timings: read=11426.745

Some rows have been added to the table since my initial mail, so the 
numbers may be slightly off.

As another reply has suggested I need to verify that somebody hasn't 
accidentally misconfigured an antivirus client to scan the database 
files. If that turns out to be the case I guess it's embarrassment of 
the year for me :-/

Best regards,
   Mikkel Lauritsen





view thread (4+ messages)

Message-ID: <9c05b2302f277afd0ced7e74a96ca5a7@tala.dk>
Permalink:  ../9c05b2302f277afd0ced7e74a96ca5a7@tala.dk/
Also on:    postgresql.org/message-id/9c05b2302f277afd0ced7e74a96ca5a7@tala.dk

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-performance@postgresql.org
  Cc: renard@tala.dk, dgrowleyml@gmail.com
  Subject: Re: Windows slowness?
  In-Reply-To: <9c05b2302f277afd0ced7e74a96ca5a7@tala.dk>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox