Ticket #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
Note: See
TracTickets for help on using
tickets.
