Re: stored proc and inserting hundreds of thousands of rows

Поиск
Список
Период
Сортировка
От Kevin Grittner
Тема Re: stored proc and inserting hundreds of thousands of rows
Дата
Msg-id 4DBC106E020000250003D0A3@gw.wicourts.gov
обсуждение исходный текст
Ответ на Re: stored proc and inserting hundreds of thousands of rows  (Joel Reymont <joelr1@gmail.com>)
Ответы Re: stored proc and inserting hundreds of thousands of rows  (Joel Reymont <joelr1@gmail.com>)
Список pgsql-performance
Joel Reymont <joelr1@gmail.com> wrote:

> I'm calculating distance between probability vectors, e.g. topics
> that a document belongs to and the topics of an ad.
>
> The distance function is already a C function. Topics are
> float8[150].
>
> Distance is calculated against all documents in the database

There's probably a way to index that so that you don't need to do a
full calculation against all documents in the database each time.
It may even be amenable to knnGiST indexing (a new feature coming in
9.1), which would let you do your select with an ORDER BY on the
distance.

PostgreSQL has a lot of very cool features you just don't have in
any other product!  :-)

-Kevin

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

Предыдущее
От: "Kevin Grittner"
Дата:
Сообщение: Re: stored proc and inserting hundreds of thousands of rows
Следующее
От: Joel Reymont
Дата:
Сообщение: Re: stored proc and inserting hundreds of thousands of rows