Re: Windows slowness?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxx> 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





[Postgresql General]     [Postgresql PHP]     [PHP Users]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Yosemite]

  Powered by Linux