pgbench
The following are scripts I use for pgbench. The scripts assume:
The following are scripts I use for pgbench. The scripts assume:
Download pgbouncer user Get Auth Min pgbouncer.ini Max pgbouncer
0) What you’ll end up with AWS confirms: 1) Create & attach a custom DB parameter group (required for pg_cron) In the AWS Console Parameters to set A) shared_preload_libraries AWS…
CREATE TABLE sales.orders_new3 ( created_at timestamp(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, order_id uuid NOT NULL DEFAULT gen_random_uuid(), customer_id bigint NOT NULL, amount numeric(12,2) NOT NULL, PRIMARY KEY (created_at, order_id) ) PARTITION…
DROP TABLE IF EXISTS sales CASCADE; -- Create parent table with partitioning CREATE TABLE sales ( id bigint NOT NULL GENERATED ALWAYS AS IDENTITY, sale_date DATE NOT NULL, amount NUMERIC(10,…
-- Use or create database (adjust as needed) -- \c test; DROP TABLE IF EXISTS calendar_basic; CREATE TABLE calendar_basic ( date_id INT NOT NULL PRIMARY KEY, full_date DATE NOT NULL,…
After
The following script loops over some PostgreSQL tables and grabs row counts
# Mount a disk in OCI The following command mounts a disk in Oracle Cloud Infrastructure (OCI): https://docs.oracle.com/en-us/iaas/Content/Block/Tasks/connectingtoavolume_topic-Connecting_to_iSCSIAttached_Volumes.htm ## Mounting commands via iscsiadm The following commands are found in the…
The following code is used to move the PostgreSQL data directory to a new directory.