From: | Robert Haas <robertmhaas(at)gmail(dot)com> |
---|---|
To: | Костя Кузнецов <chapaev28(at)yandex(dot)ru> |
Cc: | "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: gsoc knn spgist |
Date: | 2014-04-07 14:50:32 |
Message-ID: | CA+TgmoagR18XwsgDzj+JXPVQCYUUjvhqSu0RKZmDgJV2ReN1-A@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Fri, Apr 4, 2014 at 11:56 AM, Костя Кузнецов <chapaev28(at)yandex(dot)ru> wrote:
> I want to implement knn for spgist. I dont have question with knn, but have
> questions with implementation of interface.
>
> i modify pg_am.h (set amcanorderbyop to true in spgist index).Also i modify
> pg_amop.h(add
>
> DATA(insert ( 4015 600 600 15 o 517 4000 1970 ));
>
> )
>
> explain SELECT * FROM quad_point_tbl ORDER BY p <-> '-2,50'
>
> Sort (cost=1219.31..1246.82 rows=11003 width=16)
> Sort Key: ((p <-> '(-2,50)'::point))
> -> Index Only Scan using sp_quad_ind on quad_point_tbl
> (cost=0.15..480.70 r
> ows=11003 width=16)
> what am I doing wrong?
I don't know. I think there are a lot of possibilities based on the
information provided. A simple explanation would be that the planner
considered the plan you want and found the other one cheaper, but the
real cause could well be something else.
--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2014-04-07 14:54:25 | Re: FastPathStrongRelationLocks still has an issue in HEAD |
Previous Message | Andres Freund | 2014-04-07 14:48:55 | Re: FastPathStrongRelationLocks still has an issue in HEAD |