From: | salah jubeh <s_jubeh(at)yahoo(dot)com> |
---|---|
To: | vincent elschot <vinny(at)xs4all(dot)nl>, "pgsql-performance(at)postgresql(dot)org" <pgsql-performance(at)postgresql(dot)org> |
Subject: | Re: Explain analyze time overhead |
Date: | 2013-12-05 14:43:47 |
Message-ID: | 1386254627.81908.YahooMailNeo@web122205.mail.ne1.yahoo.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-performance |
Hello Tom,
The hardware is pretty good, I have 8 cpus of Intel(R) Core(TM) i7, 2.4 GH , and 16 Gib of RAM. Is there any configuration parameter that can lead to this issue.
Regards
On Thursday, December 5, 2013 3:23 PM, vincent elschot <vinny(at)xs4all(dot)nl> wrote:
On 05-12-13 15:09, salah jubeh wrote:
>
>Hello guys,
>
>
>
>When I excute a query, the exection time is about 1 minute; however, when I execute the query with explain analyze the excution time jumps to 10 minutes.
>
>I have tried this for several queries, where I need to optimize; and using explain analyze leads alway to a huge time overhead in factor of 10.
>
>
>
>This is a little bit starnge for me; did any one experience somthing like this? Can I trust the generated plans?
>
>
>
>Regards
Explain analyze does a lot more work than just explaining the query,
it excecutes it and takes not of how long things actually took,
which itself takes time. Apparently on some machines, it can take
much longer than just executing the query would take.
From the manual:
"In order to measure the run-time cost of each node in the execution plan, the current implementation of EXPLAIN ANALYZE adds profiling overhead to query execution. As a result, running EXPLAIN ANALYZE on a query can sometimes take significantly longer than executing the query normally. The amount of overhead depends on the nature of the query, as well as the platform being used. The worst case occurs for plan nodes that in themselves require very little time per execution, and on machines that have relatively slow operating system calls for obtaining the time of day."
From | Date | Subject | |
---|---|---|---|
Next Message | Skarsol | 2013-12-05 15:01:54 | WAL + SSD = slow inserts? |
Previous Message | bricklen | 2013-12-05 14:28:41 | Re: One huge db vs many small dbs |