[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: R-tree indexing, RA wrap and LISTENing
> -----Original Message-----
> From: Doug Welch [mailto:welch@physics.mcmaster.ca]
> Subject: R-tree indexing
>
> Two questions:
>
> 1) Is R-tree indexing being used on coordinate boxes of type
> box? If not, this would be a superb idea since R-tree indexed
> coordinate box queries (overlap, contained-within, etc) are
> viciously efficient and PostgreSQL implements this index.
I'm using B-Tree indexes to manage my RA/Dec searches, and it works quite
well. My query uses circle_contains_pt, but I've also bound the RA/DEC by
using BETWEEN. I may have to take a look at this. Maybe I can do away with
the BETWEEN.
Any thoughts on how to handle the stars that sit at 0 RA (or very close)?
I've been toying with creating a new PostgreSQL type which manages this wrap
automatically, but only got a very little way into that one.
>
> 2) Is anyone considering implementing an "alert" query which
> would be triggered by a object being added outside previous
> object positions (if they exist for that part of the sky)
> and/or not in the Tycho list? This would be a way of
> detecting moving objects, flare stars, novae, etc.
PostgreSQL has NOTIFY/LISTEN, which is used for just this purpose. A set of
NOTIFY events would be created, and folks could sign up to receive e-mail of
these events. Then the LISTEN would query the dB to see who wanted
notification, and then send e-mail.
>
> Cheers,
> Doug
>
Later,
Rob