Skip site navigation (1) Skip section navigation (2)

Re: knngist - 0.8

From: Alexander Korotkov <aekorotkov(at)gmail(dot)com>
To: teodor(at)sigaev(dot)ru
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: knngist - 0.8
Date: 2010-07-29 19:38:56
Message-ID: AANLkTinV_HK3CLC6_98coYkorPC75vsdYO7vheTmv5Yd@mail.gmail.com (view raw or flat)
Thread:
Lists: pgsql-hackers
I think that queries like this:
select * from test where val <-> 500 < 1 order by val <-> 500;
can also be optimized using knngist. In case of btree_gist this query can be
easily rewritten:
select * from test where val > 499 and val < 501 order by val <-> 500;
But, in pg_trgm it makes it possible to combine different similarity levels
in one query. For example:
select * from test_trgm order by t <-> 'asdf' < 0.5 or t <-> 'qwer' < 0.4;
Is there any chance to handle this syntax also?

----
With best regards,
Alexander Korotkov.

Responses

pgsql-hackers by date

Next:From: Josh BerkusDate: 2010-07-29 20:09:47
Subject: Re: On Scalability
Previous:From: Robert HaasDate: 2010-07-29 19:29:40
Subject: Re: Performance Enhancement/Fix for Array Utility Functions

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group