Received: from maia.hub.org (maia-2.hub.org [200.46.204.251]) by mail.postgresql.org (Postfix) with ESMTP id DA6021337B47 for ; Tue, 5 Oct 2010 17:03:41 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.251]) (amavisd-maia, port 10024) with ESMTP id 29373-02 for ; Tue, 5 Oct 2010 20:03:34 +0000 (UTC) X-Greylist: delayed 00:06:39.10484 by SQLgrey-1.7.6 Received: from mail.csc.lt (mail.csc.lt [193.138.191.5]) by mail.postgresql.org (Postfix) with ESMTP id ADAC61335B36 for ; Tue, 5 Oct 2010 17:03:33 -0300 (ADT) Received: (qmail 14719 invoked by uid 210); 5 Oct 2010 19:56:52 -0000 Received: from mail.nsoft.lt by mail (envelope-from , uid 201) with qmail-scanner-2.05st (clamdscan: 0.95.3/12077. spamassassin: 3.2.1. perlscan: 2.05st. Clear:RC:1(77.240.249.53):. Processed in 0.011717 secs); 05 Oct 2010 19:56:52 -0000 Received: from mail.nsoft.lt (77.240.249.53) by mail.csc.lt with SMTP; 5 Oct 2010 19:56:52 -0000 Received: from mail.nsoft.lt (localhost [127.0.0.1]) by mail.nsoft.lt (Postfix) with ESMTP id C97D78E07A for ; Tue, 5 Oct 2010 22:56:49 +0300 (EEST) Date: Tue, 5 Oct 2010 22:56:49 +0300 To: pgsql-admin@postgresql.org From: Julius T Subject: query execution time Message-ID: <1e5d6016dca5b8022106577ec316208f@mail.nsoft.lt> X-Priority: 3 X-Mailer: PHPMailer (phpmailer.codeworxtech.com) [version 2.1] X-Mailer: FeLaMiMail MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.9 tagged_above=-10 required=5 tests=BAYES_00=-1.9 X-Spam-Level: X-Archive-Number: 201010/47 X-Sequence-Number: 35788 Hello, everybody recently I have found that queries on our customer database take longer to execute than normally.=20 First thing we did was to log long queries. This led to nothing as queries logged are usually executed fast. On the other hand sometimes they take considerable amount of time... Then we tried using EXPLAIN ANALYZE - that brings me to the question: "Total runtime" of the query provided by the EXPLAIN ANALYZE is 0.200ms, = but the result of it comes after sometimes 0.2, sometimes 5 seconds. We use pgAdmin tool to query the DB - it shows how long the query took to = execute. The question is why the difference of value provided by EXPLAIN ANALYZE = and observed one is so big? I know explain analyze has its overheads, but = query itself takes long to execute. Also we've checked if the internet traffic = is not too high - it appears not even close... Now I have run out of ideas = what to check... Can you give me a hint what else can cause such behavior ? Thank You in advance.] Julius Tuskenis