Run one query and execution time is very different

From: Metatrader EA <metatraderea(at)gmail(dot)com>
To: pgsql-performance(at)postgresql(dot)org
Subject: Run one query and execution time is very different
Date: 2016-11-16 09:10:36
Message-ID: CAJNXAk39CqDNv2GQA=Jb6=gDb4-EDoom_z754T9PCaS1N=xLmA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

Hi,

I run one query and the execution is very different

Select messages
from mails_hist
join mails using (messages)
where message_date > '2016-07-19 00:00:00'
and message_date < '2016-10-17 00:00:00'
Group by message;

message_date is one timestamp

Query gives around 6300 rows

What can I look for ?

//Bill

Browse pgsql-performance by date

  From Date Subject
Next Message Metatrader EA 2016-11-17 10:43:19 Query hangs sometimes
Previous Message Gabriela Serventi 2016-11-16 00:50:46 Re: Performance decrease after upgrade to 9.6.1