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.
> 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.
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
explain analyze is the most commonly used query performance metric.Quote:> I'm just wondering, what is the equivalent of the Oracle
> Wait Interface (i.e. the V$<View_Name> system) in PostgreSQL?
I think there may be something else too.
?? 100% natural
> I think there may be something else too.
I am trying to convert an application to postgresql, and am having a
bear of a time converting the following view (from oracle). What it
does, just in case you aren't very familiar with oracle syntax, is group
the average reg_state from the events_registrations table after having
converted the varchar variables present in reg_state, into numbers to
represent the various possibilities). Then, once it has found the
average number for all items in the table events_registrations with the
same order_id number it fills in a human readable word.
Thanks for any help in letting me either know how to create this view,
or to tell me how to convert the variables in the varchar field
reg_state into the numbers I want them to represent which I will be able
to manipulate with things such as floor() and avg().
create or replace view events_orders_states
from events_orders o,
decode (floor(avg (decode (reg_state,
'void') as order_state
group by order_id) o_states
where o_states.order_id = o.order_id;
---------------------------(end of broadcast)---------------------------
TIP 4: Don't 'kill -9' the postmaster