Scopri Redshift, un database colonnare

Introduzione a Redshift

Jason Myers

Principal Architect

Panoramica di Redshift

  • Distribuito
  • Database colonnare
  • Usa la sintassi di PostgreSQL 9 con alcune estensioni
  • Cluster serverless e con provisioning

Logo Redshift

Introduzione a Redshift

Database colonnari vs a righe

Basato su righe

Esempio di database basato su righe

Colonnare

Esempio di database colonnare

Introduzione a Redshift

Il ruolo di Redshift nell'ecosistema AWS

  • Data warehouse SQL principale
  • Può essere il centro dell'ambiente AWS per funzionalità lakehouse
  • Supporta schemi esterni in
    • AWS RDS per PostreSQL
    • AWS Aurora compatibile con PostgreSQL
    • Amazon EMR per supporto Hive
    • Amazon Kinesis per dati in streaming
Introduzione a Redshift

Il ruolo di Redshift nell'ecosistema AWS

  • Query federate con altri database AWS RDS e altro
  • Integrazione con Amazon SageMaker tramite Redshift ML per supportare i data scientist.
Introduzione a Redshift

Concorrenti

  • Snowflake, BigQuery, Databricks Lakehouse, Azure Synapse Analytics

Vantaggi

  • Integrazione AWS: condivisione dati senza copie con altri servizi
  • Architettura share-nothing
  • Prestazioni ottimizzate per query ripetute
  • Prezzi con istanze riservate (RI)

Svantaggi

  • Solo AWS
  • Prestazioni query non ottimizzate
  • Flessibilità per file esterni a pagamento
Introduzione a Redshift

Visualizzare database e schemi

  • Usa SVV_REDSHIFT_SCHEMAS (interne) o SVV_ALL_SCHEMAS (interne ed esterne)
-- 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
Introduzione a Redshift

Visualizzare le tabelle in uno schema

  • Usa SVV_REDSHIFT_TABLES (interne) o SVV_ALL_TABLES (interne ed esterne)
-- 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
Introduzione a Redshift

Ayo berlatih!

Introduzione a Redshift

Preparing Video For Download...