Re: More 8.2 client issues (Was: [Slow dump?)

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Erik Jones <erik(at)myemma(dot)com>
Cc: pgsql-performance(at)postgresql(dot)org
Subject: Re: More 8.2 client issues (Was: [Slow dump?)
Date: 2007-01-03 16:56:20
Message-ID: 12515.1167843380@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

Erik Jones <erik(at)myemma(dot)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

In response to

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message Erik Jones 2007-01-03 17:10:15 Re: More 8.2 client issues (Was: [Slow dump?)
Previous Message Guillaume Smet 2007-01-03 16:50:41 Re: More 8.2 client issues (Was: [Slow dump?)