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

Поиск
Список
Период
Сортировка
От Jim C. Nasby
Тема Re: More 8.2 client issues (Was: [Slow dump?)
Дата
Msg-id 20070110200753.GR12217@nasby.net
обсуждение исходный текст
Ответ на Re: More 8.2 client issues (Was: [Slow dump?)  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-performance
On Wed, Jan 03, 2007 at 11:56:20AM -0500, 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)$';
>
>     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 ...

On the other hand, with 500k relations pg_dump is presumably going to be
doing a lot of querying of the catalog tables, so if it uses similar
queries...
--
Jim Nasby                                            jim@nasby.net
EnterpriseDB      http://enterprisedb.com      512.569.9461 (cell)

В списке pgsql-performance по дате отправления:

Предыдущее
От: "Jim C. Nasby"
Дата:
Сообщение: Re: performance implications of binary placement
Следующее
От: "Jim C. Nasby"
Дата:
Сообщение: Re: Performance of PostgreSQL on Windows vs Linux