Performance views/tables in PostgreSQL? - 03-21-2012 , 09:18 AM
I'm just wondering, what is the equivalent of the Oracle
Wait Interface (i.e. the V$<View_Name> system) in PostgreSQL?
TIA and rgs.
Re: Performance views/tables in PostgreSQL? - 03-22-2012 , 06:57 AM
On 2012-03-21, Pol <eff.off.if.you.think.youre.getting.my.email (AT) anon (DOT) com> wrote:
I think there may be something else too.
⚂⚃ 100% natural
Re: Performance views/tables in PostgreSQL? - 03-22-2012 , 07:16 AM
On Wed, 21 Mar 2012 16:18:54 +0100, Pol wrote:
have one, but it isn't free.. There are some internal tables which show
statistics, the names start with "pg_".
One of the more useful ones is installed as extension:
gogala=# \d pg_stat_statements
Column | Type | Modifiers
userid | oid |
dbid | oid |
query | text |
calls | bigint |
total_time | double precision |
rows | bigint |
shared_blks_hit | bigint |
shared_blks_read | bigint |
shared_blks_written | bigint |
local_blks_hit | bigint |
local_blks_read | bigint |
local_blks_written | bigint |
temp_blks_read | bigint |
temp_blks_written | bigint |
That is the basis for pg_statspack
Re: Performance views/tables in PostgreSQL? - 03-22-2012 , 11:04 PM
On Thu, 22 Mar 2012 12:57:52 +0000, Jasen Betts wrote:
the free version of PostgreSQL. Nada. Zilch.
Explain plan answers the question "how will Postgres execute my query".
The wait interface answers the question "where is the time spent". Note
that explain plan answers the question about the future and wait
interface answers the question about the past. Explain plan cannot tell
you whether your application was waiting for lock, resolving a deadlock
or simply dealing with a slow disk. It may not even be a database problem
at all. Java application may have a bug ,causing it to sleep and not wake
up until kissed by a prince, which doesn't happen that frequently.
Oracle will tell you that it's waiting for the more data from SQL*Net, so
you can start looking into the application. Postgres will also allow you
to make that conclusion, but not directly. You will see no activity on
the server and conclude that there is a problem with the application