On 2017-04-07 16:56, Haider Ali wrote:
Hello
I want to understand execution time of a query in PostgreSQL then I
want to relate it to the problem i am getting. According to my
observation ( I can't explain why this happen ) whenever we query a
table first time its execution will be high (sometim
- Mensaje original -
> De: "Haider Ali"
> Para: pgsql-performance@postgresql.org
> Enviados: Viernes, 7 de Abril 2017 11:56:53
> Asunto: [PERFORM] Understanding PostgreSQL query execution time
>
>
> Hello
>
>
> I want to understand execution time of a query in PostgreSQL then I
> wan
The first behavior is very likely just caching. The plan and results from the
query are cached, so the second time, it's reused directly.
If you ran a bunch of other queries in the middle and effectively exhausted the
cache, then back to your query, likely tou'd see the 'slow' behavior again.
A