...
select * from events where point(ra,dec) @ box ra_max,dec_max, ra_min,dec_min
The object point is constructed with the content of the 2 columns ra, dec
. The operator @
means is inside.
The response time is around 1.2 second.
select * from events where position @ box ra_max,dec_max, ra_min,dec_min
A column position
has been added to the table. It is of type point
and stores ra, dec
.
The response time is around 0.7 second.