Received: from maia.hub.org (maia-2.hub.org [200.46.204.251]) by mail.postgresql.org (Postfix) with ESMTP id EF4351337B50 for ; Thu, 7 Oct 2010 05:30:50 -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 65880-06 for ; Thu, 7 Oct 2010 08:30:43 +0000 (UTC) X-Greylist: from auto-whitelisted 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 18A4E1336DB6 for ; Thu, 7 Oct 2010 05:30:42 -0300 (ADT) Received: (qmail 13381 invoked by uid 210); 7 Oct 2010 08:30:40 -0000 Received: from mail.nsoft.lt by mail (envelope-from , uid 201) with qmail-scanner-2.05st (clamdscan: 0.95.3/12097. spamassassin: 3.2.1. perlscan: 2.05st. Clear:RC:1(77.240.249.53):. Processed in 0.015582 secs); 07 Oct 2010 08:30:40 -0000 Received: from mail.nsoft.lt (77.240.249.53) by mail.csc.lt with SMTP; 7 Oct 2010 08:30:40 -0000 Received: from [127.0.0.1] (unknown [77.240.249.53]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by mail.nsoft.lt (Postfix) with ESMTPS id 5A6B38E05A for ; Thu, 7 Oct 2010 11:30:38 +0300 (EEST) Message-ID: <4CAD852F.7050803@nsoft.lt> Date: Thu, 07 Oct 2010 11:30:39 +0300 From: Julius Tuskenis Organization: UAB nSoft User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; lt; rv:1.9.2.9) Gecko/20100915 Lightning/1.0b2 Thunderbird/3.1.4 MIME-Version: 1.0 To: pgsql-admin@postgresql.org Subject: Re: query execution time References: <1e5d6016dca5b8022106577ec316208f@mail.nsoft.lt> <4CAB52A0020000250003657E@gw.wicourts.gov> <4CAC6168.20608@nsoft.lt> <4CAC3B6902000025000365A3@gw.wicourts.gov> In-Reply-To: <4CAC3B6902000025000365A3@gw.wicourts.gov> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit 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/74 X-Sequence-Number: 35815 2010.10.06 17:03, Kevin Grittner rašė: >> Version string: PostgreSQL 8.3.4 on i686-pc-linux-gnu, compiled >> by GCC gcc (GCC) 4.1.2 (Gentoo 4.1.2 p1.0.2) >> https://sites.google.com/site/juliaustestukas/Home > > Well, you're showing us a version string for a Linux PostgreSQL > server, but you link to a screen shot which appears to be a client > connecting to localhost on some variety of Windows. And you didn't > tell us much of anything else. You are right - we connect to localhost on windows machine because we use ssh tunel to the postgresql server on gentoo linux. The server does not have GUI, so no pgAdmin too... The DB is used for web application writen in PHP. As the DB and WEB servers are on the same machine we can rule out the network issues I guess... The query (in the screen shot) was found in postgresql server logs as a long lasting query. I will try issue the EXPLAIN ANALIZE query from the command line on server machine to be 100% sure this is not related to networking. The behavior described is observed when there is high server usage. Using "server status" tool shows several such queries executed suddenly and then after some waiting everything goes back to normal. The top command on the server shows it has enough of ram (~200Mb free all the time). -- Julius Tuskenis Programavimo skyriaus vadovas UAB nSoft mob. +37068233050