Re: Delay locking partitions during query execution

From: David Rowley <david(dot)rowley(at)2ndquadrant(dot)com>
To: Tomas Vondra <tomas(dot)vondra(at)2ndquadrant(dot)com>
Cc: PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Delay locking partitions during query execution
Date: 2019-01-04 22:05:40
Message-ID: CAKJS1f9SHTxYb0n5YtOE8H-gU3H3ZWRajNHppN+trmvgZxNRwg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Sat, 5 Jan 2019 at 03:12, Tomas Vondra <tomas(dot)vondra(at)2ndquadrant(dot)com> wrote:
> >>
> >> partitions 0 100 1000 10000
> >> --------------------------------------------
> >> master 19 1590 2090 128
> >> patched 18 1780 6820 1130
> >>
> >> So, that's nice. I wonder why the throughput drops so fast between 1k
> >> and 10k partitions, but I'll look into that later.
> >
> > Those look strange. Why is it so slow with the non-partitioned case?
> > I'd have expected that to be the fastest result.
> >
>
> Because there are 1M rows in the table, and it's doing a seqscan.

Of course. My test did the same, but I didn't consider that because I
had so few rows per partition. Likely just adding an index would have
it make more sense.

--
David Rowley http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Mitar 2019-01-04 22:10:16 Re: Feature: triggers on materialized views
Previous Message Dmitry Molotkov 2019-01-04 21:46:54 Re: BUG #15446: Crash on ALTER TABLE