Maak kennis met Redshift, een kolomgebaseerde database

Introductie tot Redshift

Jason Myers

Principal Architect

Redshift-overzicht

  • Gedistribueerd
  • Kolomgebaseerde database
  • Gebruikt PostgreSQL 9-syntaxis met extra’s
  • Serverless en geprovisioneerde clusters

Redshift-logo

Introductie tot Redshift

Kolom- vs rij-gebaseerde databases

Rij-gebaseerd

Voorbeeld rij-gebaseerde database

Kolom-gebaseerd

Voorbeeld kolom-gebaseerde database

Introductie tot Redshift

Redshifts rol in het AWS-ecosysteem

  • Primair SQL-datawarehouse
  • Kan het hart zijn van je AWS-omgeving voor lakehouse-mogelijkheden
  • Ondersteunt externe schema’s in
    • AWS RDS voor PostgreSQL
    • AWS Aurora PostgreSQL-compatibele editie
    • Amazon EMR voor Hive-ondersteuning
    • Amazon Kinesis voor streaming data
Introductie tot Redshift

Redshifts rol in het AWS-ecosysteem

  • Gefedereerde queries met andere AWS RDS-databases en meer
  • Integreert met Amazon SageMaker via Redshift ML voor data scientists
Introductie tot Redshift

Concurrenten

  • Snowflake, BigQuery, Databricks Lakehouse, Azure Synapse Analytics

Voordelen

  • AWS-integratie: data sharing zonder kopiëren met andere services
  • Share-nothing-architectuur
  • Geoptimaliseerde herhaalquery-prestaties
  • Reserved Instance (RI)-pricing

Nadelen

  • Alleen AWS
  • Niet-geoptimaliseerde query-prestaties
  • Flexibiliteit voor externe files kost extra
Introductie tot Redshift

Databases en schema’s bekijken

  • Gebruik SVV_REDSHIFT_SCHEMAS (intern) of SVV_ALL_SCHEMAS (intern en extern)
-- View the database and schema names with the schema type
SELECT database_name, 
       schema_name, 
       schema_type 
  -- From the internal schemas view
  FROM SVV_REDSHIFT_SCHEMAS;
database_name        | schema_name         | schema_type
=====================|=====================| ===========
datacamp_course_prod | information_schema  | local
datacamp_course_prod | pg_catalog          | local
datacamp_course_prod | public              | local
dev                  | information_schema  | local
dev                  | pg_catalog          | local
dev                  | public              | local
Introductie tot Redshift

Tabellen in een schema bekijken

  • Gebruik SVV_REDSHIFT_TABLES (intern) of SVV_ALL_TABLES (intern en extern)
-- View the table name
SELECT table_name 
  -- Using a view with both internal and external tables
  FROM SVV_ALL_TABLES
 -- In the external spectrumdb schema
 WHERE schema_name = 'spectrumdb';
table_name            
======================
ecommerce_sales
global_power_plant_db
coffee_county_weather
idaho_site_id         
idaho_samples
Introductie tot Redshift

Laten we oefenen!

Introductie tot Redshift

Preparing Video For Download...