pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Heikki Linnakangas <heikki.linnakangas@enterprisedb.com>
To: Alexander Korotkov <aekorotkov@gmail.com>
Cc: pgsql-hackers <pgsql-hackers@postgresql.org>
Subject: Re: Double sorting split patch
Date: Tue, 04 Oct 2011 11:12:57 +0300
Message-ID: <4E8AC009.5040806@enterprisedb.com> (raw)
In-Reply-To: <CAPpHfdt6MO0Q9JgVXvYuf1Oe_ge_CqjCQ+ynAvYM-zEfVcEQiw@mail.gmail.com>
References: <CAPpHfdtkUfgdMwTsoNUiaKUM3HBQre1iZFiHjR2umqgTf5D_dQ@mail.gmail.com>
	<4E72197B.9040602@enterprisedb.com>
	<CAPpHfdu+7RKA+jF4ek9CjAiAbCV=v666AMffg2RyvFnvKdbuyQ@mail.gmail.com>
	<4E732DFF.9070900@enterprisedb.com>
	<CAPpHfdsYROQbYw1kME0aro=ygLTGd8pKgYFh6GnVPO7VJTW2ew@mail.gmail.com>
	<4E74D21C.2070503@enterprisedb.com>
	<CAPpHfdsfXiQib=Jd2C4obuPQpoQ-CDPskbL-VaOaZd4uAoCOBw@mail.gmail.com>
	<CAPpHfds1YZSg6tdUrX+bFS3q=NFN+sSVx_awvbb0hKupUrmQ-g@mail.gmail.com>
	<4E7B1A7C.80103@enterprisedb.com>
	<CAPpHfdtf_sKufPJZ0XrOba8zcsWApBWUaqAPRv39niSEQYdrdA@mail.gmail.com>
	<CAPpHfdt6MO0Q9JgVXvYuf1Oe_ge_CqjCQ+ynAvYM-zEfVcEQiw@mail.gmail.com>

On 22.09.2011 22:12, Alexander Korotkov wrote:
> Patch without that dead code is attached.

Thanks.

Can you elaborate the consider-split algorithm? The criteria to select 
the new split over the previously selected one is this:
> ! 		/*
> ! 		 * If ratio is acceptable, we should compare current split with
> ! 		 * previously selected one. If no split was selected then we select
> ! 		 * current anyway. Between splits of one dimension we search for
> ! 		 * minimal overlap (allowing negative values) and minimal ration
> ! 		 * (between same overlaps. We switch dimension if find less overlap
> ! 		 * (non-negative) or less range with same overlap.
> ! 		 */
> ! 		range = diminfo->upper - diminfo->lower;
> ! 		overlap = ((leftUpper) - (rightLower)) / range;
> ! 		if (context->first ||
> ! 			(context->dim == dimNum &&
> ! 			 (overlap < context->overlap ||
> ! 			  (overlap == context->overlap && ratio > context->ratio))) ||
> ! 			(context->dim != dimNum &&
> ! 			 ((range > context->range &&
> ! 			   non_negative(overlap) <= non_negative(context->overlap)) ||
> ! 			  non_negative(overlap) < non_negative(context->overlap)))
> ! 			)
> ! 		{

Why are negative overlaps handled differently across dimensions and 
within the same dimension? Your considerSplit algorithm in the SYRCoSE 
2011 paper doesn't seem to make that distinction.

-- 
   Heikki Linnakangas
   EnterpriseDB   http://www.enterprisedb.com



view thread (24+ messages)  latest in thread

Message-ID: <4E8AC009.5040806@enterprisedb.com>
Permalink:  ../4E8AC009.5040806@enterprisedb.com/
Also on:    postgresql.org/message-id/4E8AC009.5040806@enterprisedb.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-hackers@postgresql.org
  Cc: heikki.linnakangas@enterprisedb.com, aekorotkov@gmail.com
  Subject: Re: Double sorting split patch
  In-Reply-To: <4E8AC009.5040806@enterprisedb.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox