[postgis-users] beginner questions re. SRID
schabi at logix-tt.com
Fri Oct 21 07:59:34 PDT 2005
> I didn't bother setting my SRID when creating my tables. I thought I'd
> leave it for later, when I better understand this whole projection thing.
> Do you mean to say that having all my SRID's as -1 influences my query
> performance. I mainly make use of the following type of queries.
No, this should not influcene your query performance at all.
What I had in mind was having a mixed-SRID geometry column, and then
ussuing queries like:
SELECT * FROM table WHERE setsrid('BOX(0 0, 47 11)'::box2d,4326) &&
As you have to reproject the geometries individually into the same SRID
as your query bbox, the query planner cannot make any use of the indexes.
If you know that your query areas will always have the same SRID, you
can add a second geometry column to the table containing the already
projected geometries (or even just their bboxes) and then use an index
on it to speed up your query.
More information about the postgis-users