Opened 14 years ago
Closed 12 years ago
#3374 closed task (fixed)
WMS-Time support in PostGIS rewrite
Reported by: | pramsey | Owned by: | tbonfort |
---|---|---|---|
Priority: | normal | Milestone: | 6.0 release |
Component: | PostGIS Interface | Version: | unspecified |
Severity: | normal | Keywords: | |
Cc: | schroete@…, assefa |
Description
The current time support is inelegant in implementation, and inefficient to boot. As reported by a user, the queries of the form
date_trunc('resolution', datecolumn) <= 'querytime' and date_trunc('resolution', datecolumn) >= 'querytime'
have the effect of rendering indexes on the datecolumn ineffective. The correct way to write the query is
datecolumn >= 'querytime' and datecolumn <= 'querytime' + 'resolution'::interval
In general the PgSQL interval syntax is called for here and date_trunc should be dropped (except maybe for rounding the querytime prior to applying the interval, if necessary).
Also, breaking the implementation down into smaller parts would probably make it a lot less intimidating and amenable to future maintenance.
Change History (5)
comment:1 by , 14 years ago
Cc: | added |
---|
comment:2 by , 13 years ago
Owner: | changed from | to
---|
comment:3 by , 13 years ago
comment:4 by , 12 years ago
closing. subsequent postgis time bugs should be reported in their own ticket.
fixed in r12568
I also took the liberty of refactoring the time code into different modules.
Slightly modified msautotest wms_time tests to use postgis connections pass with these changes. There are a serie of tests that do not pass, but they indicate that the shapefile time support is broken rather than the rewritten postgis queries (those tests also fail with the previous postgis implementation)