Received: from localhost (unknown [200.46.204.183]) by developer.postgresql.org (Postfix) with ESMTP id 2C1702E0073 for ; Sun, 15 Jun 2008 10:48:40 -0300 (ADT) Received: from developer.postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 26034-04 for ; Sun, 15 Jun 2008 10:48:31 -0300 (ADT) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from fg-out-1718.google.com (fg-out-1718.google.com [72.14.220.154]) by developer.postgresql.org (Postfix) with ESMTP id 17B2B2E0035 for ; Sun, 15 Jun 2008 10:48:36 -0300 (ADT) Received: by fg-out-1718.google.com with SMTP id 16so3416454fgg.23 for ; Sun, 15 Jun 2008 06:48:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from :user-agent:mime-version:to:subject:content-type :content-transfer-encoding; bh=h+epmE5I0EHpw4QDJyx9D0fWEmSdNdKAl7uBI2FtjTo=; b=MPSWM1Ndo8TqnNcF30XWxAwdVejEyS3utQs/ICefQM8dWz0bgjfemSDAcUlZLEL3Cx aHVb4gb7mQ5BuxmzjjzDZG5iIAIQmnaoo/A9/M0LGL5BH+2hCwgy66glo/UOVN9gbOql hHpWXlRiRmCMpR/cB0cUqegQDzWkVD6WILTVs= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:subject :content-type:content-transfer-encoding; b=I0sZOgogbH0UGO8oxJaSP1SKmGO9KPvW8MDgsJ3vaPXPF1h47lLawJc13IiC2rlt7k j0punzeUSzFgb/0AKzV/+kIrUqcFUpRul3CRXRjLpIqqkJR0jMMjBxErVKxkoq1tUMPb ZUOX9U/QKUX2KvqX6hZaiOUlQvVcjPLriC+9k= Received: by 10.86.29.19 with SMTP id c19mr6985731fgc.28.1213537715177; Sun, 15 Jun 2008 06:48:35 -0700 (PDT) Received: from Uwes-iMac.local ( [92.226.132.30]) by mx.google.com with ESMTPS id e20sm10534424fga.1.2008.06.15.06.48.33 (version=SSLv3 cipher=RC4-MD5); Sun, 15 Jun 2008 06:48:34 -0700 (PDT) Message-ID: <48551DB0.8050507@gmail.com> Date: Sun, 15 Jun 2008 15:48:32 +0200 From: Uwe Bartels User-Agent: Thunderbird 2.0.0.12 (Macintosh/20080213) MIME-Version: 1.0 To: pgsql-performance@postgresql.org Subject: how to find the sql using most of the i/o in an oltp system Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0 tagged_above=0 required=5 tests=none X-Spam-Level: X-Archive-Number: 200806/52 X-Sequence-Number: 30402 Hi, I read a lot about postgres tuning and did some of it. But one of the things, when you start tuning a system that is completely new to you, is checking which sql statement(s) cost most of the resources. cpu instensive sql seems easy to find. But how do I find i/o intensive sql as fast as possible? Tuning a sql statements I'm familiar with. Finding a sql statement which takes too long due to i/o is probably easy as well. But how about statements that take about 100 ms, that read a lot and that are executed several times per second? To ask the same question just different - Is there a possibility to check how many pages/kB a sql reads from shared buffer and how many pages/kB from disk? Is there a possibility to read or create historical records about how often, how fast one sql is run and how many reads it used from shared buffers, from disk an so on. Best regards, Uwe