Skip site navigation (1) Skip section navigation (2)

Query plan and execution time of a query

From: "Mickael DELOISON" <mdeloison(at)gmail(dot)com>
To: pgsql-hackers(at)postgresql(dot)org
Subject: Query plan and execution time of a query
Date: 2007-07-21 13:26:19
Message-ID: 1f8f052b0707210626mab1f89ye17a78eb47cf9c27@mail.gmail.com (view raw or flat)
Thread:
Lists: pgsql-hackers
Hello,

I am trying to get the execution time of a query by using JDBC (Java).
To do that I make the difference between the time (in milliseconds)
after the query execution and the time before the query execution.

The first time I do that, I get the real execution time, but the query
plan seems to be cached. And the next time I do the same operation,
for a simple query I do not get the real time (in fact  my 'simple'
query seems to execute in 0 millisecond).

So I need help: I would like to solve this problem but I do not know
how. I have tried some researches on Internet but I did not find. Is
there a possibility to disable the query plan cache temporarily? It is
also possible I am totally wrong and the problem is not where I see
it... Anyway I need help.

Thank you in advance,
Mickael

Responses

pgsql-hackers by date

Next:From: Pavel StehuleDate: 2007-07-21 15:40:06
Subject: 8.2 is 30% better in pgbench than 8.3
Previous:From: Simon RiggsDate: 2007-07-21 11:20:24
Subject: Re: Updated bitmap index patch

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group