Re: \d on database with a lot of tables is slow
От | Jim C. Nasby |
---|---|
Тема | Re: \d on database with a lot of tables is slow |
Дата | |
Msg-id | 20050927224626.GC30974@pervasive.com обсуждение исходный текст |
Ответ на | Re: \d on database with a lot of tables is slow (Tom Lane <tgl@sss.pgh.pa.us>) |
Ответы |
Re: \d on database with a lot of tables is slow
|
Список | pgsql-hackers |
On Mon, Sep 26, 2005 at 03:00:44PM -0400, Tom Lane wrote: > "Jim C. Nasby" <jnasby@pervasive.com> writes: > >>> I have a client with a database that contains 4000 relations according > >>> to vacuum verbose, and \d in psql is painfully slow. In particular... > > It's presumably mostly in the pg_table_is_visible() calls. Not sure if > we can do much to speed those up, but: how many schemas in your search > path? What's the distribution of pg_class entries among the schemas? db=# show search_path;decibel, pg_sysviews, information_schema, rrs, public db=# select schema_name, count(*) from pg_user_tables group by schema_name;public | 764ledger | 6state | 2_track_replica | 10repair | 3summarized | 586orders | 512snapshot | 1012acl | 10 db=# Also, do you have any idea on the 'Did not find relation named "table-thats-there"' error? table-thats-there isn't a temp table, and I don't believe they're even using temp tables, so I don't think that's the issue. -- Jim C. Nasby, Sr. Engineering Consultant jnasby@pervasive.com Pervasive Software http://pervasive.com work: 512-231-6117 vcard: http://jim.nasby.net/pervasive.vcf cell: 512-569-9461
В списке pgsql-hackers по дате отправления: