gem/oq-engine — pull request #1084 by micheles (2013-03-11 14:34:36+00:00)
Title: Minor simplification of the hazard_getter query

Removing the polygon constraint in the inner query in the hazard getters it is impossible without killing the performance; removing the polygon constraint in the outer query instead is possible and slightly beneficial (~3% faster and a bit less memory occupation) so I did it.
I have also left in place the PerformanceMonitor measuring the hazard getters so that
one can see the figure with the following query:

select sum(duration) as duration, sum(pymemory) as pymemory, sum(pgmemory) as pgmemory from uiapi.performance where oq_job_id=%s and operation='hazard_getter';