Isak Hansen wrote:
First thing I notice is that your query plans seem to only use one index.
Postgres should be able to combine the timestamp and account_id
indexes in that first query, if the optimizer thought there was a
point in doing so?
Absolutely brilliant - this solved my issue, brought the query time down
to about 2 seconds initially, then about 500 milliseconds thereafter.
Thank you very much for this tip.
---------------------------(end of broadcast)---------------------------
TIP 9: In versions below 8.0, the planner will ignore your desire to
choose an index scan if your joining column's datatypes do not
match