Auteur/autrice : admin
-
Nombre de ligne dans les tables postgres
SELECT reltuples::bigint AS estimate FROM pg_class WHERE oid = ‘myschema.mytable’::regclass;
-
[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 », […]
-
Convertisseur EUR BTC
convertisseur euro btc #include <stdio.h>int main() { float euro, bitcoin, exchange_rate; printf(« Enter amount in Euros: « ); scanf(« %f », &euro); exchange_rate = 60296.35; // current exchange rate […]
-
Connexions aux db du cloud
#!/bin/sh#——————————————————————————-## Script to connect to IBM Cloud DB, version 2.0# Author : JJY##——————————————————————————-#set -vx###############INSTANCIATION##############DOMAIN= »<domain> »DATABASE= »postgres »USERNAME= »<user_dba> »while truedoDATABASE= »postgres » clear echo « CONNEXION AUX BASES DU CLOUD » echo » » echo « CONNEXION A l ECOSYSTEM : <ecosystem> » echo » […]
-
[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 […]
-
Résoudre l’ORA-600 doc id 2523249.1
Optimizer expression statistics monitoring is introduced in 12.2 database version. For specific applications, this might end up in growing repository segments. Monitoring expression statistics is introduced for a new optimizer […]