Received: from localhost (maia-5.hub.org [200.46.204.182]) by postgresql.org (Postfix) with ESMTP id 340C79FA28E for ; Wed, 3 Jan 2007 13:10:27 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.182]) (amavisd-new, port 10024) with ESMTP id 32291-10 for ; Wed, 3 Jan 2007 13:10:18 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey-1.7.4 Received: from myemma.com (db1.e2ma.net [66.179.147.163]) by postgresql.org (Postfix) with ESMTP id 138359F9F44 for ; Wed, 3 Jan 2007 13:10:19 -0400 (AST) Received: from localhost (localhost.localdomain [127.0.0.1]) by myemma.com (Postfix) with ESMTP id 4B82923D01; Wed, 3 Jan 2007 11:10:18 -0600 (CST) Received: from myemma.com ([127.0.0.1]) by localhost (velma [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 26379-01; Wed, 3 Jan 2007 11:10:17 -0600 (CST) Received: from [10.0.23.39] (unknown [209.149.59.218]) by myemma.com (Postfix) with ESMTP id B6A5E23CCE; Wed, 3 Jan 2007 11:10:17 -0600 (CST) Message-ID: <459BE377.1030706@myemma.com> Date: Wed, 03 Jan 2007 11:10:15 -0600 From: Erik Jones User-Agent: Thunderbird 1.5.0.7 (Windows/20060909) MIME-Version: 1.0 To: Tom Lane Cc: pgsql-performance@postgresql.org Subject: Re: More 8.2 client issues (Was: [Slow dump?) References: <459AD5A8.7030102@myemma.com> <22512.1167779361@sss.pgh.pa.us> <459BD61C.3030202@myemma.com> <11617.1167841479@sss.pgh.pa.us> <459BDC98.8030008@myemma.com> <12515.1167843380@sss.pgh.pa.us> In-Reply-To: <12515.1167843380@sss.pgh.pa.us> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new-20030616-p10 (Debian) at myemma.com X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200701/38 X-Sequence-Number: 22639 Tom Lane wrote: > Erik Jones writes: > >> Tom Lane wrote: >> >>> I could see this taking an unreasonable amount of time if you had a huge >>> number of pg_class rows or a very long search_path --- is your database >>> at all out of the ordinary in those ways? >>> >>> >> Well, running "select count(*) from pg_class;" returns 524699 rows >> > > Ouch. > > >> our search path is the default. I'd also like to reiterate that \d >> pg_class returns instantly when run from the 8.1.4 psql client connected >> to the 8.2 db. >> > > I think I know where the problem is: would you compare timing of > > select * from pg_class where c.relname ~ '^(pg_class)$'; > Approximately 4 seconds. > select * from pg_class where c.relname ~ '^pg_class$'; > Instant. > Recent versions of psql put parentheses into the regex pattern for > safety in case it's got "|", but I just realized that that probably > confuses the optimizer's check for an indexable regex :-( > > However, this only explains slowdown in psql's \d commands, which > wasn't your original complaint ... > Well, it explains the slowdown wrt a query against the catalog tables by a postgres client application. Were there any changes made like this to pg_dump and/or pg_restore? -- erik jones software development emma(r)