Catégorie : Postgresql
-
[Postgres] Create partitionned tables and rotate
Script to create partitionned tables and rotate it on one year DECLARE […]
-
PostgreSQL performance Turing Indexes
https://www.timescale.com/learn/postgresql-performance-tuning-optimizing-database-indexes
-
[Postgres] Fonction pour compter les lignes
Pratique lors d’une migration pour vérifier que toutes les lignes sont bien là ! set schema ‘admin’;drop function IF EXISTS count_rows;create or replace function count_rows(schema text, tablename text) returns integeras$body$declare result […]
-
[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 », […]
-
[Postgres] Spot a missing postgreSQL index
–tuto tuning psql–Spot a missing PostgreSQL index –returns the tables which have been hit by sequential scans the most and tells us how many rows a sequential scan has hit […]
-
Migration assessment
Migration assessment Migration assessment 1rst Method We use 3 servers : · Management server : which hosts ora2pg server, open flow between the oracle server and the management server. Open flow […]
-
[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 […]
-
PostgreSQL in IBM Cloud.
Création d’une base postgresql avec role hvault en mode batch dans le cloud IBM.. #!/bin/sh# Desc : $1 is the name of the ASSET you want to deploy# […]
-
Migration of Synonyms from Oracle to PostgreSQL
Migration of Synonyms from Oracle to PostgreSQL – MigOps