Hi Jose,
How much ram is in the server? Can you also post the following values from
postgres config:
work_mem
shared_buffers
Frequently when those are incorrectly configured, it can lead to significant
performance issues (like 40 second queries that should be sub-second). Out of
the box, Post
Thanks for your responses. Sorry, I forgot to mention that the query
actually takes 46 seconds despite what analyze (I dont quite understand the
output of explain). We did perform a vacuum last Friday and it seems to
help but not too much. We'll also try to recreate the indices.
Here's the output
On 2012-12-22 13:06:21 +0100, Alban Hertroys wrote:
> > and here's my query
> >
> > select * from ticket
> > where created between '2012-12-19 00:00:00' and '2012-12-20 00:00:00'
> >
> > This was working fine until the number of records started to grow (about 5
> > million) and now it's taking fo
> and here's my query
>
> select * from ticket
> where created between '2012-12-19 00:00:00' and '2012-12-20 00:00:00'
>
> This was working fine until the number of records started to grow (about 5
> million) and now it's taking forever to return.
>
> Explain analyze reveals this:
>
> "Inde