Re: Cube extension kNN support

From: Oleg Bartunov <obartunov(at)gmail(dot)com>
To: Stas Kelvich <stas(dot)kelvich(at)gmail(dot)com>
Cc: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Cube extension kNN support
Date: 2013-09-23 06:26:51
Message-ID: CAF4Au4ybJ_7Kr7whJVHunWjjjyTwZYaPuLr0Ny5ZfFschc8naA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Do you have any benchmarks ?

On Mon, Sep 23, 2013 at 3:38 AM, Stas Kelvich <stas(dot)kelvich(at)gmail(dot)com>wrote:

> Hello, hackers.
>
> Here is the patch that introduces kNN search for cubes with euclidean,
> taxicab and chebyshev distances.
>
> Following distance operators introduced:
>
> <#> taxicab distance
> <-> euclidean distance
> <=> chebyshev distance
>
> For example:
> SELECT * FROM objects ORDER BY objects.coord <-> '(137,42,314)'::cube
> LIMIT 10;
>
> Also there is operator "->" for selecting ordered rows directly from index.
> This request selects rows ordered ascending by 3rd coordinate:
>
> SELECT * FROM objects ORDER BY objects.coord->3 LIMIT 10;
>
> For descendent ordering suggested syntax with minus before coordinate.
> This request selects rows ordered descending by 4th coordinate:
>
> SELECT * FROM objects ORDER BY objects.coord->-4 LIMIT 10;
>
> Stas Kelvich.
>
>
>
>
> --
> Sent via pgsql-hackers mailing list (pgsql-hackers(at)postgresql(dot)org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-hackers
>
>

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Abhijit Menon-Sen 2013-09-23 06:47:44 Re: LDAP: bugfix and deprecated OpenLDAP API
Previous Message Fabien COELHO 2013-09-23 05:44:21 Re: pgbench progress report improvements - split 3