Re: Windows slowness? - Mailing list pgsql-performance

From Mikkel Lauritsen
Subject Re: Windows slowness?
Date
Msg-id 9c05b2302f277afd0ced7e74a96ca5a7@tala.dk
Whole thread Raw
In response to Re: Windows slowness?  (David Rowley <dgrowleyml@gmail.com>)
List pgsql-performance
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



pgsql-performance by date:

Previous
From: David Rowley
Date:
Subject: Re: Windows slowness?
Next
From: regrog
Date:
Subject: view reading information_schema is slow in PostgreSQL 12