X-Original-To: pgsql-performance-postgresql.org@postgresql.org Received: from localhost (mx1.hub.org [200.46.208.251]) by postgresql.org (Postfix) with ESMTP id C1C399F9F0C for ; Wed, 13 Sep 2006 15:57:12 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.208.251]) (amavisd-new, port 10024) with ESMTP id 69413-08 for ; Wed, 13 Sep 2006 15:57:00 -0300 (ADT) X-Greylist: domain auto-whitelisted by SQLgrey- Received: from nf-out-0910.google.com (nf-out-0910.google.com [64.233.182.189]) by postgresql.org (Postfix) with ESMTP id C10519FA197 for ; Wed, 13 Sep 2006 15:57:00 -0300 (ADT) Received: by nf-out-0910.google.com with SMTP id p77so1882016nfc for ; Wed, 13 Sep 2006 11:56:59 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=X+ry9eK5O8zWLSiiWYcM7mIDaBJbmpfYTw5ueGcBkYiCxWOz4mc+6/8wTNt6DB8UzsCRTDhuxX+KTwgzVyL5ZYs4kvqmSrSW16myo+7G0ySxRXP8HDji4VcOhVUHKk6SIICigHQ/v8idKBsgbOzwZNePhl5zPfvHoaiseQ1w5ms= Received: by 10.49.20.5 with SMTP id x5mr11253710nfi; Wed, 13 Sep 2006 11:56:58 -0700 (PDT) Received: by 10.49.42.19 with HTTP; Wed, 13 Sep 2006 11:56:58 -0700 (PDT) Message-ID: <38242de90609131156n6eb102f9p8c7a09d12264c942@mail.gmail.com> Date: Wed, 13 Sep 2006 12:56:58 -0600 From: "Joshua Marsh" To: "Bucky Jordan" Subject: Re: Query Progress (was: Performance With Joins on Large Tables) Cc: "Jeff Davis" , pgsql-performance@postgresql.org, jim@nasby.net, bujordan@gmail.com In-Reply-To: <78ED28FACE63744386D68D8A9D1CF5D4104D08@MAIL.corp.lumeta.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <38242de90609130919k33208204ka1006ff0ca25f75b@mail.gmail.com> <78ED28FACE63744386D68D8A9D1CF5D4104D08@MAIL.corp.lumeta.com> X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.074 tagged_above=0 required=5 tests=AWL, SPF_PASS X-Spam-Level: X-Archive-Number: 200609/127 X-Sequence-Number: 20813 On 9/13/06, Bucky Jordan wrote: > > Setting to 0.1 finally gave me the result I was looking for. I know > that the index scan is faster though. The seq scan never finished (i > killed it after 24+ hours) and I'm running the query now with indexes > and it's progressing nicely (will probably take 4 hours). > > > In regards to "progressing nicely (will probably take 4 hours)" - is > this just an estimate or is there some way to get progress status (or > something similar- e.g. on step 6 of 20 planned steps) on a query in pg? > I looked through Chap 24, Monitoring DB Activity, but most of that looks > like aggregate stats. Trying to relate these to a particular query > doesn't really seem feasible. > > This would be useful in the case where you have a couple of long running > transactions or stored procedures doing analysis and you'd like to give > the user some feedback where you're at. > > Thanks, > > Bucky > I do it programmatically, not through postgresql. I'm using a cursor, so I can keep track of how many records I've handled. I'm not aware of a way to do this in Postgresql.