Fixes bug 916159 Adds a 5 minute window to query

Adding a WHERE clause to limit partition scanning and use a new index.