Re: R-tree and start/end queries

Поиск
Список
Период
Сортировка
От Bruno Wolff III
Тема Re: R-tree and start/end queries
Дата
Msg-id 20050921183837.GA27439@wolff.to
обсуждение исходный текст
Ответ на R-tree and start/end queries  (Sean Davis <sdavis2@mail.nih.gov>)
Ответы Re: R-tree and start/end queries  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-sql
On Wed, Sep 21, 2005 at 13:52:40 -0400, Sean Davis <sdavis2@mail.nih.gov> wrote:
> I have a table like:
> 
> Create table gf (
>     pk    serial,
>     start int,
>     end   int,
>     gf    varchar
> );
> 
> I want to do queries along the lines of:
> 
> "find all gf that overlap with (10000,20000)" or
> "find all gf that overlap with each other"
> 
> And others.  I have read over the documentation, but I still remain unclear
> about how to implement R-tree indexing in this situation.  Any suggestions?

There is a built in type for line segments that uses floating point. That
will probably be usable by you directly unless the integers can can large
enough that precision is a problem. There is an overlaps operator for the
geometric types that could be used to answer your sample questions.


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

Предыдущее
От: Sean Davis
Дата:
Сообщение: R-tree and start/end queries
Следующее
От: Chris Mungall
Дата:
Сообщение: Re: R-tree and start/end queries