Re: obtener el peso de un tabla

From: Anthony <asotolongo(at)uci(dot)cu>
To: Miguel Angel Hernandez Moreno <miguel(dot)hdz(dot)mrn(at)gmail(dot)com>
Cc: Lista PostgreSql <pgsql-es-ayuda(at)postgresql(dot)org>
Subject: Re: obtener el peso de un tabla
Date: 2011-02-18 01:27:01
Message-ID: 4D5DCAE5.3090901@uci.cu
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-es-ayuda

El 17/02/2011 20:38, Miguel Angel Hernandez Moreno escribió:
>
> saludos lista
>
> me gustaria saber cuanto es que pesa?
> algo asi como un
> pg_column_size
>
> pero para las tablas
>
> gracias
> --
> ISC Miguel Angel Hernandez Moreno
>
mira a ver estas funciones
||pg_relation_size|(/|relation|/ |regclass|, /|fork|/ |text|)|
|bigint| Disk space used by the specified fork (|'main'|, |'fsm'| or
|'vm'|) of the table or index with the specified OID or name
||pg_relation_size|(/|relation|/ |regclass|)| |bigint| Shorthand for
|pg_relation_size(..., 'main')|

o algo como

SELECT pg.relname AS "Tabla", pg_size_pretty((relpages*8)::bigint*1024)
AS "Tamaño estimado"

FROM pg_class pg

where relname='tu tabla'

In response to

Browse pgsql-es-ayuda by date

  From Date Subject
Next Message Lazaro Ruben Garcia Martinez 2011-02-18 03:45:16 Duda Cybercluster y PgCluster!!!
Previous Message Miguel Angel Hernandez Moreno 2011-02-18 00:38:14 obtener el peso de un tabla