X-Original-To: pgsql-admin-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.2]) by svr1.postgresql.org (Postfix) with ESMTP id 33A33D1B517; Fri, 7 Nov 2003 23:03:32 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (neptune.hub.org [200.46.204.2]) (amavisd-new, port 10024) with ESMTP id 20247-04; Fri, 7 Nov 2003 19:03:03 -0400 (AST) Received: from seapdc01.PNTS (ip63.usw216.dsl-acs2.sea.iinet.com [209.20.216.63]) by svr1.postgresql.org (Postfix) with ESMTP id BF354D1B500; Fri, 7 Nov 2003 19:02:48 -0400 (AST) Received: from busbydev (BUSBY-DEV [10.0.0.17]) by seapdc01.PNTS with SMTP (Microsoft Exchange Internet Mail Service Version 5.5.2653.13) id TSH2TB65; Fri, 7 Nov 2003 15:23:24 -0800 Message-ID: <006d01c3a582$1beb68d0$1100000a@busbydev> Reply-To: "David Busby" From: "David Busby" To: "Jaime Casanova" , , , References: Subject: Re: [GENERAL] [HACKERS] retrieve statement from catalogs Date: Fri, 7 Nov 2003 14:54:32 -0800 Organization: Pacific Northwest Ticket Service MIME-Version: 1.0 Content-Type: text/plain; charset="Windows-1252" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2800.1158 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165 X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200311/147 X-Sequence-Number: 11134 Can you just use the SQL logging and read that file afterwords? /djb ----- Original Message ----- From: "Jaime Casanova" To: ; ; Sent: Friday, November 07, 2003 14:59 Subject: Re: [GENERAL] [ADMIN] [HACKERS] retrieve statement from catalogs > > Hi everybody, can anyone tell me if there's a way to retrieve the select > instruction executed from the catalogs, or maybe via some structure in a > trigger? > > The reason is that i have some selects constructed on-the-fly (just part of > it) and i want to save that in a table in order to know what are the most > used for optimizing them. > > Another reason for doing that is that i don't know all the selects in the > program nor the page and this is an easier solution than examine all the > code. > > thanx in advance, el_vigia > > _________________________________________________________________ > Protect your PC - get McAfee.com VirusScan Online > http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963 > > > ---------------------------(end of broadcast)--------------------------- > TIP 4: Don't 'kill -9' the postmaster