Re: More 8.2 client issues (Was: [Slow dump?) - Mailing list pgsql-performance

From Erik Jones
Subject Re: More 8.2 client issues (Was: [Slow dump?)
Date
Msg-id 459BE377.1030706@myemma.com
Whole thread Raw
In response to Re: More 8.2 client issues (Was: [Slow dump?)  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-performance
Tom Lane wrote:
> 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)$';
>
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 <erik@myemma.com>
software development
emma(r)


pgsql-performance by date:

Previous
From: Tom Lane
Date:
Subject: Re: More 8.2 client issues (Was: [Slow dump?)
Next
From: Erik Jones
Date:
Subject: Re: More 8.2 client issues (Was: [Slow dump?)