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 67F1E528CC for ; Tue, 2 Aug 2005 16:59:41 -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 91341-07 for ; Tue, 2 Aug 2005 19:59:30 +0000 (GMT) Received: from mail.nordicbet.com (mail.nordicbet.com [193.69.167.130]) by svr1.postgresql.org (Postfix) with ESMTP id 94A8B52A9E for ; Tue, 2 Aug 2005 16:59:28 -0300 (ADT) Received: from [84.48.51.94] (helo=tobias.nordicbet.invalid) (Authenticated Sender=tobias@nordicbet.com) by mail.nordicbet.com with esmtpa (Exim 4.50 #1 (Debian)) id 1E02tD-0004eD-N5; Tue, 02 Aug 2005 21:57:38 +0200 Received: by tobias.nordicbet.invalid (Postfix, from userid 500) id 5085FE004E; Tue, 2 Aug 2005 21:59:16 +0200 (CEST) Date: Tue, 2 Aug 2005 21:59:15 +0200 From: Tobias Brox To: Tobias Brox Cc: pgsql-performance@postgresql.org Subject: Re: "nice"/low priority Query Message-ID: <20050802195915.GA9691@tobias.lan> References: <20050802160434.GD9278@tobias.lan> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20050802160434.GD9278@tobias.lan> Organization: Group Nordicbet User-Agent: Mutt/1.5.8i X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0 tagged_above=0 required=5 tests= X-Spam-Level: X-Archive-Number: 200508/25 X-Sequence-Number: 13772 [Tobias Brox - Tue at 06:04:34PM +0200] > (...) and at one > point in the code I'm even asking the database for "explain plan", grepping > out the estimated cost number, and referring the user to take contact with > the IT-dept if he really needs the report. But I digress. I just came to think about some more "dirty" tricks I can do. I have turned on stats collection in the configuration; now, if I do: select count(*) from pg_stat_activity where not current_query like '%'; or, eventually: select count(*) from pg_stat_activity where not current_query like '%' and query_start+'1 second'