[Fwd: Re: Optimize]

Поиск
Список
Период
Сортировка
Искать

[Fwd: Re: Optimize]

От:
Torsten Schulz <comic@be-a-part.de>
Дата:
Hi,

> You can see doing   select * from pg_stat_activity the
> queries that are currently running on your server, and
> do a explain analize on it to see which one is the
> bottleneck. If you are running the 7.4 you can see on
> the log the total ammount for each query.


with this query I see how much queries running, but the field 
current_query are free, so i can't see which queries are very slow.

Greetings
Torsten


Re: [Fwd: Re: Optimize]

От:
Gaetano Mendola <mendola@bigfoot.com>
Дата:
Torsten Schulz wrote:
> Hi,
> 
>> You can see doing   select * from pg_stat_activity the
>> queries that are currently running on your server, and
>> do a explain analize on it to see which one is the
>> bottleneck. If you are running the 7.4 you can see on
>> the log the total ammount for each query.
> 
> 
> 
> with this query I see how much queries running, but the field 
> current_query are free, so i can't see which queries are very slow.

You must perform that query with permission of  super_user.


Regards
Gaetano Mendola


Re: [Fwd: Re: Optimize]

От:
Torsten Schulz <comic@be-a-part.de>
Дата:
Gaetano Mendola wrote:

> Torsten Schulz wrote:
>
>> Hi,
>>
>>> You can see doing   select * from pg_stat_activity the
>>> queries that are currently running on your server, and
>>> do a explain analize on it to see which one is the
>>> bottleneck. If you are running the 7.4 you can see on
>>> the log the total ammount for each query.
>>
>>
>>
>>
>> with this query I see how much queries running, but the field 
>> current_query are free, so i can't see which queries are very slow.
>
>
> You must perform that query with permission of  super_user.
>
I've made it in root-account with psql -U postgres - but i can't see the 
query

Regards
Torsten Schulz

Re: [Fwd: Re: Optimize]

От:
"Russell Garrett" <rg@tcslon.com>
Дата:
>>> with this query I see how much queries running, but the field
>>> current_query are free, so i can't see which queries are very slow.
>>
>>
>> You must perform that query with permission of  super_user.
>>
> I've made it in root-account with psql -U postgres - but i can't see
> the query

You must have these lines in your postgresql.conf for the query stats to be
collected:

stats_start_collector = true
stats_command_string = true

--------------------------------------------------------------------
Russ Garrett                                            russ@last.fm
                                                      http://last.fm

FAQ