Re: Enumeration of tables is very slow in largish database

Поиск
Список
Период
Сортировка
От Pavel Stehule
Тема Re: Enumeration of tables is very slow in largish database
Дата
Msg-id CAFj8pRDd-4Bvpzw5G=gF3WO2pQEOd4O9D+gQLBu9eYREipwJCw@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Enumeration of tables is very slow in largish database  (Kirill Müller <kirill.mueller@ivt.baug.ethz.ch>)
Список pgsql-general
2012/1/11 Kirill Müller <kirill.mueller@ivt.baug.ethz.ch>:
> On 01/11/2012 02:44 PM, Andres Freund wrote:
>>
>> On Wednesday, January 11, 2012 11:07:23 AM Kirill Müller wrote:
>>>
>>> Hi all,
>>>
>>> we have a Postgres/PostGIS database with 100+ schemas and 200+ tables in
>>> each schema, generated automatically. When adding a new PostGIS layer in
>>> QGis, the application obviously enumerates all tables, and this takes
>>> minutes. Even browsing the database in pgAdmin3 is horribly slow -- it
>>> takes several seconds to e.g. open a schema (click on a schema's "+" in
>>> the tree view).
>>
>> Are you actually sure its the database and not just pgadmin thats getting
>> really slow?
>>
>> If you connect via psql and use \dt (see \? for a list of commands) and
>> consorts, is it that slow as well?
>
> \dt is quick, I haven't tried the other commands, though. I have built qgis
> from source and will try to find out this way which query stalls. I wonder
> if Postgres has a profiling tool like MS SQL Server that would allow tracing
> the queries and their runtime while they are executed. Or perhaps there are
> logs? Could you give me some pointers, please?

log_min_duration_statement = 0 in postgresql.conf and after reload, pg
logs all query to log

Regards

Pavel

>
>
>
> Kirill
>
> --
> _________________________________________________
> ETH Zürich
> Institute for Transport Planning and Systems
> HIL F 32.2
> Wolfgang-Pauli-Str. 15
> 8093 Zürich
>
> Phone:       +41 44 633 33 17
> Fax:         +41 44 633 10 57
> Secretariat: +41 44 633 31 05
> E-Mail:      kirill.mueller@ivt.baug.ethz.ch
>
>
> --
> Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-general

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

Предыдущее
От: Kirill Müller
Дата:
Сообщение: Re: Enumeration of tables is very slow in largish database
Следующее
От: "Francisco Figueiredo Jr."
Дата:
Сообщение: Re: Is there a reason why Postgres doesn't have Byte or tinyint?