Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1T9QrD-0005dY-6P for pgsql-performance@postgresql.org; Thu, 06 Sep 2012 01:26:11 +0000 Received: from mail-ob0-f174.google.com ([209.85.214.174]) by magus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1T9QrA-0002Of-88 for pgsql-performance@postgresql.org; Thu, 06 Sep 2012 01:26:10 +0000 Received: by obbuo13 with SMTP id uo13so1553554obb.19 for ; Wed, 05 Sep 2012 18:26:05 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding :x-gm-message-state; bh=ihXNRdUdQw0Yc52adssOLvTX5QDVaesieGocu3qFKBk=; b=bQQFu9orZBaCgpFv8aa7OUD6Tax3g7AnxowmSMFqBG3aSuCVq7GbB1fG1uWZu6aJhc 7DSGBsr6GMOac4+/C/TCKO/E69OZigNIXv5reYt0d9Ud3LIMF8YgSTGSUNNFw9rRNCVe d2WEHWlO5EFHZpFl2mPgpkeG07O4WKcwJ+5Avs3eQm8QkhXQhRJ09hneSDo6GfICjY9i CTMJABq5N2rjAD/prKrnhALiZTaapqwMaYZ8O7wjq/sI+zcEhACVfcuJpIUEmGohmFzY W4xDUwmOcNHZWNpcyuGl0IXaZ9Vjp4lVmAUzWh/fpA0dGSRW7YSzRjiUDtTB+eb0u8I/ 2vPg== Received: by 10.182.75.100 with SMTP id b4mr351492obw.12.1346894765569; Wed, 05 Sep 2012 18:26:05 -0700 (PDT) Received: from ayaki.localdomain (203-219-208-78.static.tpgi.com.au. [203.219.208.78]) by mx.google.com with ESMTPS id d4sm634713obx.3.2012.09.05.18.26.02 (version=SSLv3 cipher=OTHER); Wed, 05 Sep 2012 18:26:04 -0700 (PDT) Message-ID: <5047FBA8.1030909@ringerc.id.au> Date: Thu, 06 Sep 2012 11:26:00 +1000 From: Craig Ringer User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:14.0) Gecko/20120717 Thunderbird/14.0 MIME-Version: 1.0 To: Anibal David Acosta CC: pgsql-performance@postgresql.org Subject: Re: query performance, where goes time? References: <00c801cd8bb0$2a0bbe10$7e233a30$@devshock.com> In-Reply-To: <00c801cd8bb0$2a0bbe10$7e233a30$@devshock.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Gm-Message-State: ALoCoQnWgCZJv+p9RD/0c7q5LnbMnae3YRaM+9CO5TdHfU711+ljUTw0Z+P/s1L0rzMyNFwXuJVP X-Pg-Spam-Score: -1.9 (-) X-Archive-Number: 201209/12 X-Sequence-Number: 47758 On 09/06/2012 07:48 AM, Anibal David Acosta wrote: > Using explain analyze I saw that many of my queries run really fast, > less than 1 milliseconds, for example the analyze output of a simple > query over a table with 5millions of records return "Total runtime: > 0.078 ms" > > But the real time is a lot more, about 15 ms, in fact the pgadmin show > this value. > > So, where goes the others 14.2 ms? Client-side latency, time spent transmitting query results, and network latency. You'll see much less difference in queries that take more meaningful amounts of time. This query is so fast that timing accuracy will be an issue on some systems, and so will scheduler jitter etc. -- Craig Ringer