pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Bruce Momjian <bruce@momjian.us>
To: Alexander Korotkov <aekorotkov@gmail.com>
Cc: Emre Hasegeli <emre@hasegeli.com>
Cc: PostgreSQL Hackers <pgsql-hackers@postgresql.org>
Cc: Heikki Linnakangas <hlinnakangas@vmware.com>
Subject: Re: KNN-GiST with recheck
Date: Thu, 25 Sep 2014 21:18:00 -0400
Message-ID: <20140926011800.GA8130@momjian.us> (raw)
In-Reply-To: <CAPpHfdvEpZAJrMBkNrCguG4fCK5QtZjARPti7LnL5chsSuD=Sg@mail.gmail.com>
References: <CAPpHfdvn5jxgh-rVMz7c2vXoYW_W7dGrJjQkVAtaCr=-ZMCADA@mail.gmail.com>
	<20140803134809.GA58181@hasegeli-2.local>
	<CAPpHfdu3JmBrsgsrtaAQJMpXyMgrW+T2P7Gmf9oP8L1V7zLvOg@mail.gmail.com>
	<20140914180936.GA5084@hasegeli.com>
	<CAPpHfdvEpZAJrMBkNrCguG4fCK5QtZjARPti7LnL5chsSuD=Sg@mail.gmail.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-hackers>

On Sun, Sep 14, 2014 at 11:34:26PM +0400, Alexander Korotkov wrote:
>     > Cost estimation of GiST is a big problem anyway. It doesn't care (and
>     > can't) about amount of recheck for regular operators. In this patch, same
>     > would be for knn recheck. The problem is that touching heap from access

This is very important work.  While our existing KNN-GiST index code
works fine for scalar values and point-to-point distance ordering, it
doesn't work well for 2-dimensional objects because they are only
indexed by their bounding boxes (a rectangle around the object).  The
indexed bounding box can't produce accurate distances to other objects. 

As an example, see this PostGIS blog post showing how to use LIMIT in a
CTE to filter results and then compute the closest object (search for
"LIMIT 50"):

	http://shisaa.jp/postset/postgis-postgresqls-spatial-partner-part-3.html

This patch fixes our code for distances from a point to indexed 2-D
objects.

Does this also fix the identical PostGIS problem or is there something
PostGIS needs to do?

-- 
  Bruce Momjian  <bruce@momjian.us>        http://momjian.us
  EnterpriseDB                             http://enterprisedb.com

  + Everyone has their own god. +


-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers



view thread (42+ messages)  latest in thread

Message-ID: <20140926011800.GA8130@momjian.us>
Permalink:  ../20140926011800.GA8130@momjian.us/
Also on:    postgresql.org/message-id/20140926011800.GA8130@momjian.us

 · 

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: bruce@momjian.us, aekorotkov@gmail.com, emre@hasegeli.com, hlinnakangas@vmware.com
  Subject: Re: KNN-GiST with recheck
  In-Reply-To: <20140926011800.GA8130@momjian.us>

* 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