Re: Dynamic Partitioning using Segment Visibility Maps - Mailing list pgsql-hackers

From Markus Schiltknecht
Subject Re: Dynamic Partitioning using Segment Visibility Maps
Date
Msg-id 4780AFF3.7070904@bluegap.ch
Whole thread Raw
In response to Re: Dynamic Partitioning using Segment Visibility Maps  ("Gokulakannan Somasundaram" <gokul007@gmail.com>)
Responses Re: Dynamic Partitioning using Segment Visibility Maps  ("Gokulakannan Somasundaram" <gokul007@gmail.com>)
Re: Dynamic Partitioning using Segment Visibility Maps  (Simon Riggs <simon@2ndquadrant.com>)
List pgsql-hackers
Hi,

Gokulakannan Somasundaram wrote:
> 
> 
> On Jan 5, 2008 6:15 PM, <tomas@tuxteam.de <mailto:tomas@tuxteam.de>> wrote:
> 
> 
>     One thought I had back then, with partitioned tables was "gee -- B-tree
>     index is already doing a partition; why do a manual partition on top of
>     that?".
> 
> Can you please explain more on what you are trying to say here?

I think this has to do with SE not being of much use for index scans. Or 
put it another way: SE is an optimization for sequential scans. For 
tables where it works well, it could possibly replace the index entirely.

Without the index, you would rely on SE to always be able to exclude 
enough segments, so that the seq scan is less expensive than an index 
scan with the following table lookups.

With an index, the planner gets a hard time deciding between the index 
scan and the (possibly SE optimized) seq scan.

Regards

Markus



pgsql-hackers by date:

Previous
From: "Joshua D. Drake"
Date:
Subject: Re: Bug: Unreferenced temp tables disables vacuum to update xid
Next
From: Markus Schiltknecht
Date:
Subject: Re: Dynamic Partitioning using Segment Visibility Maps