X-Original-To: pgsql-performance-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id DAB6D52AD2 for ; Tue, 12 Jul 2005 20:32:42 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 26593-08 for ; Tue, 12 Jul 2005 23:32:32 +0000 (GMT) Received: from web33901.mail.mud.yahoo.com (web33901.mail.mud.yahoo.com [66.163.178.65]) by svr1.postgresql.org (Postfix) with SMTP id 92CF252ACE for ; Tue, 12 Jul 2005 20:32:30 -0300 (ADT) Received: (qmail 5468 invoked by uid 60001); 12 Jul 2005 23:32:30 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=Message-ID:Received:Date:From:Subject:To:Cc:In-Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=tRlxZBNqo0nFert/UevCiQarJFH9FX68N2hz1J4K4wwGvFVabe2P97L84LJ3Lpy/huvVlvVvZDpNtwaqqXUYq43On0+9PPwLBxBjVsa6rQKWKJ0CZiUvQjCiqxS+MY4X0Vw9mAnbfhe8r7q83JEW/vNVMM4cR6tqrOwfFEIvC/c= ; Message-ID: <20050712233230.5466.qmail@web33901.mail.mud.yahoo.com> Received: from [67.106.37.5] by web33901.mail.mud.yahoo.com via HTTP; Tue, 12 Jul 2005 16:32:30 PDT Date: Tue, 12 Jul 2005 16:32:30 -0700 (PDT) From: Brent Henry Subject: Re: General DB Tuning To: Tom Arthurs Cc: pgsql-performance@postgresql.org In-Reply-To: <42D43C17.90005@jobflash.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=2.174 tagged_above=0 required=5 tests=FORGED_YAHOO_RCVD X-Spam-Level: ** X-Archive-Number: 200507/127 X-Sequence-Number: 13368 Yes, that is exactly what I want to use! Unfortunately, it doesn't work if you access postgres through a JDBC connection. I don't know why. I found a posting from back in February which talks aobut this a little: http://archives.postgresql.org/pgsql-admin/2005-02/msg00055.php But I can't find anywhere where someone has fixed it. Am I the only one accessing postgres through JDBC? -Brent --- Tom Arthurs wrote: > I have this in my postgresql.conf file and it works > fine (set the min to > whatever you want to log) > log_min_duration_statement = 3000 # -1 is disabled, > in milliseconds. > > Another setting that might get what you want: > > #log_duration = false > > uncomment and change to true. > > From the docs: > (http://www.postgresql.org/docs/8.0/interactive/runtime-config.html) > > Causes the duration of every completed statement > which satisfies > log_statement to be logged. When using this option, > if you are not using > syslog, it is recommended that you log the PID or > session ID using > log_line_prefix so that you can link the statement > to the duration using > the process ID or session ID. The default is off. > Only superusers can > change this setting. > > Brent Henry wrote: > > Help! After recently migrating to Postgres 8, > I've > > discovered to my horror that I can't determine > which > > queries are poorly performing anymore because the > > logging has drastically changed and no longer > shows > > durations for anything done through JDBC. > > > > So I'm desperately trying to do performance tuning > on > > my servers and have no way to sort out which > > statements are the slowest. > > > > Does anyone have any suggestions? How do you > > determine what queries are behaving badly when you > > can't get durations out of the logs? > > > > I have a perl script that analyzes the output from > > Postgres 7 logs and it works great! But it relies > on > > the duration being there. > > > > I did some searches on postgresql.org mailing > lists > > and have seen a few people discussing this > problem, > > but noone seems to be too worried about it. Is > there > > a simple work-around? > > > > Sincerely, > > > > Brent > > > > > > > > > ____________________________________________________ > > Sell on Yahoo! Auctions – no fees. Bid on great > items. > > http://auctions.yahoo.com/ > > > > ---------------------------(end of > broadcast)--------------------------- > > TIP 5: don't forget to increase your free space > map settings > > > > > > > > ---------------------------(end of > broadcast)--------------------------- > TIP 2: Don't 'kill -9' the postmaster > __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com