Catégorie : Postgresql

PostgreSQL Defrag les plus gros indexes et tables

Réduire la fragmentation  https://www.timescale.com/learn/how-to-reduce-bloat-in-large-postgresql-tables Afficher les (10) plus gros indexes : SELECT    indexrelname AS index_name,    pg_size_pretty(pg_relation_size(relid)) AS index_size,    pg_size_pretty(pg_total_relation_size(relid)) As « Total Size »FROM pg_catalog.pg_stat_all_indexes WHERE schemaname =’public’ORDER BY pg_total_relation_size(relid). read more…

[Postgres] Size taille table / index

SELECT   relname  as table_name,   pg_size_pretty(pg_total_relation_size(relid)) As « Total Size »,   pg_size_pretty(pg_indexes_size(relid)) as « Index Size »,   pg_size_pretty(pg_relation_size(relid)) as « Actual Size »   FROM pg_catalog.pg_statio_user_tables ORDER BY pg_total_relation_size(relid) DESC;

[Postgres] SET DB ENV

/tech/postgres/dba/jjy setDB.bash#! /bin/bash#################################################################### Program      : setDB.bash                                 ### Description  : Set environement variables. read more…

Translate »