Improve Requeuing Query
- Relevant file: src/main/java/gov/usgs/earthquake/aws/JsonNotificationIndex.java
- Relevant method: getMissingNotifications
Currently the query is not using indexes. There exists an index for source
, type
, code
, updateTime
, but it is not being used because the query syntax places the created as '', t.expires
at the beginning of the query. Using the index could optimize the query. Try using the explain plan to ensure the new query is optimized. In plain language, this query is attempting to find all notifications in this.table
that do not yet exist in otherTable
. A new query, procedure, etc. is acceptable for implementation.