From: Tom Lane <tgl@sss.pgh.pa.us>
To: Erik Jones <erik@myemma.com>
Cc: pgsql-performance@postgresql.org
Subject: Re: More 8.2 client issues (Was: [Slow dump?)
Date: Wed, 03 Jan 2007 11:56:20 -0500
Message-ID: <12515.1167843380@sss.pgh.pa.us> (raw)
In-Reply-To: <459BDC98.8030008@myemma.com>
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>
Erik Jones <erik@myemma.com> 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)$';
select * from pg_class where c.relname ~ '^pg_class$';
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 ...
regards, tom lane
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-performance@postgresql.org
Cc: tgl@sss.pgh.pa.us, erik@myemma.com
Subject: Re: More 8.2 client issues (Was: [Slow dump?)
In-Reply-To: <12515.1167843380@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox