Re: Windows slowness?

From: Mikkel Lauritsen <renard(at)tala(dot)dk>
To: David Rowley <dgrowleyml(at)gmail(dot)com>
Cc: pgsql-performance <pgsql-performance(at)postgresql(dot)org>
Subject: Re: Windows slowness?
Date: 2020-06-11 05:05:50
Message-ID: 9c05b2302f277afd0ced7e74a96ca5a7@tala.dk
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(at)tala(dot)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

In response to

Browse pgsql-performance by date

  From Date Subject
Next Message regrog 2020-06-12 15:21:18 view reading information_schema is slow in PostgreSQL 12
Previous Message David Rowley 2020-06-10 21:08:28 Re: Windows slowness?