[ADMIN] db size and tables size difference

2009-09-24 Thread Isabella Ghiurea
Tom Lane wrote: Isabella Ghiurea writes: > The issue may be with pg_size_pretty() results, I don't have details > knowledge of this function. I doubt it, that's a pretty simple function ... but if you don't trust it, just remove the pg_size_pretty call and look directly at the output of th

Re: [ADMIN] db size and tables size difference

2009-09-23 Thread Tom Lane
Isabella Ghiurea writes: > The issue may be with pg_size_pretty() results, I don't have details > knowledge of this function. I doubt it, that's a pretty simple function ... but if you don't trust it, just remove the pg_size_pretty call and look directly at the output of the size functions. >

Re: [ADMIN] db size and tables size difference

2009-09-23 Thread Isabella Ghiurea
| 584 kB > > > > > *** OR : check for the biggest tables+index size: > SELECT ' Top 20 biggest tables and indexes' > ; > SELECT nspname || '.' || relname AS "relation", >pg_size_pretty(pg_relation_size(nspname || '.&#x

Re: [ADMIN] db size and tables size difference

2009-09-23 Thread Tom Lane
Isabella Ghiurea writes: > SELECT nspname || '.' || relname AS > "relation",pg_size_pretty(pg_total_relation_size(nspname || '.' || relname)) > AS "s > ize" > FROM pg_class C > LEFT JOIN pg_namespace N ON (N.oid = C.relnamespace) > ORDER BY pg_total_relation_size(nspname || '.' || relname) D

Re: [ADMIN] db size and tables size difference

2009-09-23 Thread Isabella Ghiurea
artifact_i1 | 171 MB caom.simpleobservation| 165 MB caom.spatialentity_i1 | 162 MB caom.positionsample | 110 MB caom.plane_psi2 | 86 MB caom.temporalentity | 77 MB caom.spectralentity | 68 MB caom.plane_energy_i1 | 67 MB caom.plane_time_i1| 58 MB caom.pl

Re: [ADMIN] db size and tables size difference

2009-09-23 Thread Tom Lane
Isabella Ghiurea writes: > SELECT nspname || '.' || relname AS > "relation",pg_size_pretty(pg_total_relation_size(nspname || '.' || > relname)) AS "s > ize" > FROM pg_class C > LEFT JOIN pg_namespace N ON (N.oid = C.relnamespace) > ORDER BY pg_relation_size(nspname || '.' || relname) DESC

Re: [ADMIN] db size and tables size difference

2009-09-23 Thread Isabella Ghiurea
Hi All, Please, see more info my env: PG 8.3.6 on RHE5-64bits. 1. there are more than one schemas, but the size of the tables is close to 30-40kB, see some samples schemaname | tablename | size_pretty | total_size_pretty +-+-+--- tap_sche

Re: [ADMIN] db size and tables size difference

2009-09-22 Thread Naomi Walker
How would one check for catalog bloat? And, if bloated, would unloading and reloading the database fix it? Naomi 3. Bloat in other system catalogs. 5GB of catalog bloat would be pretty awful, but maybe that's what it is. Try that last query without the namespace restrictions.

Re: [ADMIN] db size and tables size difference

2009-09-22 Thread Tom Lane
Naomi Walker writes: > How would one check for catalog bloat? Like I said: >> Try that last query without the namespace restrictions. Isabella excluded pg_catalog, so if that's where the problem is, that's why she didn't see it. But let's see the data before discussing how to fix it...

Re: [ADMIN] db size and tables size difference

2009-09-22 Thread Tom Lane
Isabella Ghiurea writes: > I'm trying to understand why there are GB's difference when checking > for db size using pg_size_pretty() and querying for tables + indexes > size. . You are not counting everything --- the total DB size is clearly 12GB, so the question is where are the other 5.

[ADMIN] db size and tables size difference

2009-09-22 Thread Isabella Ghiurea
Hi Pg Admin list. I'm trying to understand why there are GB's difference when checking for db size using pg_size_pretty() and querying for tables + indexes size. . The sum of tables +index sizes is showing as aprox 6.5GB and pg_size_pretty(dbname) is coming as 12GB, this are the resul