...
select id, time, energy 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.
select id, time, energy from events where error && box ra_max,dec_max, ra_min,dec_min
A column error
has been added to the table. It is of type box
and stores ra+dg, dec+dg, ra-dg, dec dg
with dg = 1.°
. The operator &&
means overlaps.
The response time is around 0.9 ** second.
A R-tree index has been built using the error
bounding box.
The response time is 0.01 ** seconds.
PostGIS adds support for geographic objects to PostgreSQL. It implements some of the OpenGIS specifications.
The events
table has been modified to comply with the OpenGIS standard. The following statement has been sent to the database :
select id, time, energy from events where error &&
GeomFromText('POLYGON((ra_max dec_max, ra_max dec_min, ra_min dec_min, ra_min dec_max, ra_max dec_max)', -1)
The response time is 3.7 ** seconds.
A GIST index has been built.
The response time is 2. seconds.
...