Catégorie : Postgresql

[Postgres] Mesure the bloat

intéressant mon cher watson SELECT  current_database() AS « Database »,  schemaname AS « Schema »,  tablename AS « Table »,  reltuples::bigint AS « Lines »,  /*relpages::bigint, otta,*/  ROUND((CASE WHEN otta=0 THEN 0.0 ELSE sml.relpages::float/otta END)::numeric,1) AS « Table bloat », . read more…

[Postgres] Découverte d’une DB

Découverte d’une base postgres SELECT schemaname as table_schema, relname as table_name, n_live_tup as row_count FROM pg_stat_user_tables ORDER BY n_live_tup DESC; echo ===================================echo OBJECT COUNTecho ==================================SELECT    n.nspname as schema_name    ,CASE. read more…

Translate »