Re: application of KNN code to US zipcode searches?

Поиск
Список
Период
Сортировка
От Kevin Grittner
Тема Re: application of KNN code to US zipcode searches?
Дата
Msg-id 4D5CE118020000250003AB83@gw.wicourts.gov
обсуждение исходный текст
Ответ на application of KNN code to US zipcode searches?  (Mark Stosberg <mark@summersault.com>)
Ответы Re: application of KNN code to US zipcode searches?  (Mark Stosberg <mark@summersault.com>)
Список pgsql-performance
Mark Stosberg <mark@summersault.com> wrote:

> Sample EXPLAIN output and query times are below.

>  Seq Scan on zipcodes  (cost=0.00..1257.54 rows=41483 width=22)
> (actual time=0.019..84.543 rows=41483 loops=1)

>  Index Scan using zipcodes_knn on zipcodes  (cost=0.00..5365.93
> rows=41483 width=22) (actual time=0.451..141.590 rows=41483
> loops=1)

I thought the benefit of KNN was that you could retrieve the rows in
distance order, so that a query for the closest 20 locations (for
example) would be very fast.  I wouldn't have expected it to be
helpful when you're selecting all the rows regardless of distance.

-Kevin

В списке pgsql-performance по дате отправления:

Предыдущее
От: Mark Stosberg
Дата:
Сообщение: application of KNN code to US zipcode searches?
Следующее
От: Mark Stosberg
Дата:
Сообщение: Re: application of KNN code to US zipcode searches?