Re: Hash partitioning. - Mailing list pgsql-hackers

From Heikki Linnakangas
Subject Re: Hash partitioning.
Date
Msg-id 51CB0CBD.3030601@vmware.com
Whole thread Raw
In response to Re: Hash partitioning.  (Kevin Grittner <kgrittn@ymail.com>)
Responses Re: Hash partitioning.
List pgsql-hackers
On 26.06.2013 18:34, Kevin Grittner wrote:
> Markus Wanner<markus@bluegap.ch>  wrote:
>> On 06/25/2013 11:52 PM, Kevin Grittner wrote:
>>> At least until we have parallel
>>> query execution.  At *that* point this all changes.
>>
>> Can you elaborate on that, please? I currently have a hard time
>> imagining how partitions can help performance in that case,
>> either.
>
> Well, partitioning will *still* be a net loss for overall
> throughput on a machine with enough active connections to keep all
> the resources busy.  Where it will help is when you have a machine
> with a lot of cores and a few big "reporting" style queries.  Since
> we currently can only use one core for a single query, we leave a
> lot of CPU time (often the bottleneck for such queries) unused.  If
> we allow a large query to search multiple partitions in parallel, a
> big query can complete sooner.

We could also allow a large query to search a single table in parallel. 
A seqscan would be easy to divide into N equally-sized parts that can be 
scanned in parallel. It's more difficult for index scans, but even then 
it might be possible at least in some limited cases.

- Heikki



pgsql-hackers by date:

Previous
From: Kevin Grittner
Date:
Subject: Re: Hash partitioning.
Next
From: Stephen Frost
Date:
Subject: Re: A better way than tweaking NTUP_PER_BUCKET