version: "3.6" | |
services: | |
yb-master: | |
image: yugabytedb/yugabyte:latest | |
container_name: yb-master-n1 | |
volumes: | |
- yb-master-data-1:/mnt/master | |
command: [ "/home/yugabyte/bin/yb-master", | |
"--fs_data_dirs=/mnt/master", |
The gist includes exercises for the "Mastering Multi-Region Deployments With YugabyteDB" workshop. Attend the summit and follow the steps below to get a practical experience.
If you're not familiar with BRIN, check these easy-to-follow articles: https://www.crunchydata.com/blog/postgres-indexing-when-does-brin-win https://medium.com/geekculture/postgres-brin-index-large-data-performance-with-minimal-storage-4db6b...
Start a postgres instance and connect to it with psql
or your favorite tool. And then follow the steps below.
- Create a table and fill in with dummy date:
Relational databases such as PostgreSQL can do much more than store and return your application records. Those databases usually come with comprehensive compute capabitilies.
In this short note, let's review the generate_series function of PostgreSQL, then can generate mock data of various complexity.
- Create a sample table for time-series data:
create table sensor ( id int,
/******************************************************************************* | |
Chinook Database - Version 1.4 | |
Script: Chinook_PostgreSql.sql | |
Description: Creates and populates the Chinook database. | |
DB Server: PostgreSql | |
Author: Luis Rocha | |
License: http://www.codeplex.com/ChinookDatabase/license | |
********************************************************************************/ |
StringBuilder queryString = "insert into test (id, f1) values ";
// add placeholder for values
for (int counter = 0; counter <= 100; counter += 1)
queryString.append("(?, ?),");
// replace the trailing ',' with a ';'
queryString.replace(queryString.length() - 1, queryString.length(), ";");