Skip site navigation (1) Skip section navigation (2)

Re: Less rows -> better performance?

From: Łukasz Filut <l(dot)filut(at)wsb(dot)pl>
To: Mario Weilguni <mweilguni(at)sime(dot)com>
Cc: Andreas Hartmann <andreas(at)apache(dot)org>, pgsql-performance(at)postgresql(dot)org
Subject: Re: Less rows -> better performance?
Date: 2008-07-22 07:48:34
Message-ID: 488590D2.4080800@wsb.pl (view raw or flat)
Thread:
Lists: pgsql-performance
[...]
> You can check this too:
> select relname, relpages, reltuples, relkind
>  from pg_class
> where relkind in ('r', 'i')
> order by relpages desc limit 20;
>
> Will give you the top-20 tables and their sizes, 1 page is typically 
> 8KB, so you can cross-check if relpages/reltuples is completly off, 
> this is a good indicator for table/index bloat.
use this query :
select pg_size_pretty(pg_relation_size(oid)) as relation_size,relname, 
relpages, reltuples, relkind
 from pg_class
where relkind in ('r', 'i')
order by relpages desc limit 20;

output will be much more readeable
>
> Regards,
> Mario
    Lukasz

-- 
Lukasz Filut
DBA - IT Group, WSB-TEB Corporation
Poznan - Poland


In response to

pgsql-performance by date

Next:From: Valentin BogdanovDate: 2008-07-22 11:32:28
Subject: Re: Perl/DBI vs Native
Previous:From: Stephane BailliezDate: 2008-07-22 06:46:08
Subject: Re: Performance on Sun Fire X4150 x64 (dd, bonnie++, pgbench)

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group