From: | Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org> |
---|---|
To: | Diego Ayala <netdiego81(at)gmail(dot)com> |
Cc: | Postgres Ayuda <pgsql-es-ayuda(at)postgresql(dot)org> |
Subject: | Re: error en el log |
Date: | 2010-05-19 22:08:40 |
Message-ID: | 1274306877-sup-3032@alvh.no-ip.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-es-ayuda |
Excerpts from Diego Ayala's message of mié may 19 16:53:28 -0400 2010:
> Alvaro, en realidad es esta funcion la que tengo, no se si seria lo mismo
>
> CREATE OR REPLACE FUNCTION pg_relation_size(regclass)
> RETURNS bigint AS
> $BODY$select pg_catalog.pg_relation_size($1, 'main')$BODY$
Ah, bueno, no es lo mismo. Prueba así:
SELECT ts.*, pg_relation_size(ts.relid) AS table_size,
pg_total_relation_size(ts.relid) AS total_size,
ios.heap_blks_read, ios.heap_blks_hit, ios.idx_blks_read,
ios.idx_blks_hit,
ios.toast_blks_read, ios.toast_blks_hit, ios.tidx_blks_read,
ios.tidx_blks_hit
FROM pg_stat_user_tables ts LEFT JOIN pg_statio_user_tables ios on
ts.relid = ios.relid
WHERE ts.relname = $1
--
From | Date | Subject | |
---|---|---|---|
Next Message | Alvaro Herrera | 2010-05-20 03:09:50 | Re: Backup |
Previous Message | ALFONSO REYES | 2010-05-19 21:50:35 | Re:Hi |