Received: from localhost (unknown [200.46.204.183]) by postgresql.org (Postfix) with ESMTP id 5AF872E007C for ; Wed, 26 Mar 2008 09:24:46 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 98683-07 for ; Wed, 26 Mar 2008 09:24:33 -0300 (ADT) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.5 Received: from wr-out-0506.google.com (wr-out-0506.google.com [64.233.184.231]) by postgresql.org (Postfix) with ESMTP id DAC592E0062 for ; Wed, 26 Mar 2008 09:24:33 -0300 (ADT) Received: by wr-out-0506.google.com with SMTP id 76so3086274wra.10 for ; Wed, 26 Mar 2008 05:24:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:sender:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references:x-google-sender-auth; bh=V9ZmS6st2uzsitPs6pimFDKZb71oX5U1RJQy6go8jio=; b=ZnxSOwNXk+rCvjISC7AvUBO3ltWHOl6OSMYdoNZZeMDs3cssT7Sb02TYlRoAfBxWSroK7qpr+P4F5X9NQqUVT9Ui21p0fyKodhNSbzV8dwpfu6zLMXjgKocBZFAAiG0NlarfLTNmXHdslfz6l19f0igu4vRTcuZcZlbOBWDv4bw= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=message-id:date:from:sender:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references:x-google-sender-auth; b=Zb0z6SmzHKq9DtaaOAL0qAhIscmpXuCVitxQz1zLbWvwPSxeyBfbT6cZf5lmbCCWs9g+DVYImfCStA0j+uimu2JoOj9EiB91r0pk9SjpGv6u9Y6ejymMRCruGAaag6ObiKSHw/8JskIP0Itmt+KmE1Cbzi3ESeP2+Oz4NOegaxY= Received: by 10.140.169.6 with SMTP id r6mr4356015rve.210.1206534271603; Wed, 26 Mar 2008 05:24:31 -0700 (PDT) Received: by 10.141.195.9 with HTTP; Wed, 26 Mar 2008 05:24:31 -0700 (PDT) Message-ID: Date: Wed, 26 Mar 2008 13:24:31 +0100 From: "Peter Kovacs" To: "Scott Marlowe" Subject: Re: Tuning Cc: Jack , pgsql-admin@postgresql.org In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <002601c88e02$5629fc10$027df430$@com> X-Google-Sender-Auth: 5a9017277dc3a5e5 X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200803/223 X-Sequence-Number: 28706 tkprof generates performance characteristics for an arbitrary number of SQL statements. The output includes measurements for the individual SQL statements as well as cumulated values for the sequence of SQL statements being measured. Data is presented in a two dimensional format with the first dimension being the type of operation (parsing, compiling, executing, fetching) and the second dimension being the time spent in CPU or IO. You can see a sample output here: http://www.jlcomp.demon.co.uk/tkprof_01.html . The trick is that the Oracle code is instrumented to track all the information necessary for these measurements. When tracing is enabled, the measure values are output sequentially and this output is the post-processed by tkprof. The raw (tracing) output is also fairly readable, so if you want to dig deeper than the tkprof output, you can use it (eventually post-processing it in your own way). I am not familiar with PostgreSQL's explain analyze method, but as far as I remember, it can be used only for one SQL statement and requires a significant amount of practice to interpret easily. BTW, I had a bookmark for a good tutorial on explain analyze, but the page is no longer available: http://www.pervasive-postgres.com/instantkb13/article.aspx?id=10120 . Can you suggest a good tutorial? Thanks Peter On Tue, Mar 25, 2008 at 4:29 PM, Scott Marlowe wrote: > On Mon, Mar 24, 2008 at 4:56 PM, Jack wrote: > > > > > > > > > > Is there a Postgres equivalent of tkprofs for tuning? > > you might want to provide an explanation of what tkprofs is and which > parts you're interested in emulating in pgsql. > > Have you read up on explain, explain analyze, and the various > pg_stat_* tables? Do any of those help? > > -- > Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org) > To make changes to your subscription: > http://www.postgresql.org/mailpref/pgsql-admin >