SlideShare a Scribd company logo
RedShift-Performance Tuning In Few Clicks
Sadagopan.K.V
Performance Tuning Levels
● Table Design
● Query
● INFRA level
(Clusters)
● Data migration
Performance Tuning - Redshift
Figure out the requirement
Table Design
● Felicitous distribution style
○ ALL
○ KEY
○ EVEN
Use DISTSTYLE ALL only when the table is not
big.
● Tag the correct DISTKEY
○ Helps in data distribution.
○ Plays a key role in self joins
Table Design-Contd
● SORTKEY
○ Use the option of multiple sort keys
○ Date,timestamp,count etc.
○ Correctly sorted tables will easy work for self
joins
● Primary Key & Foreign key
○ Used by query planner
○ Helps in faster self joins
Querying
● Allergic to SELECT *
○ Reduces Scan time & I/O
○ Easy query plan
● EXPLAIN command to view the query
plan
Querying-contd
● Query Queues
○ Avoid execution bottlenecks
○ High response
● Don’t use Cross-joins unless
absolutely necessary
○ reduces nested loops & faster the
execution
Querying-contd
● Use CASE expression
○ similar to if/then/else
○ Avoids multiple selects
INFRA Level
● Nodes , Processors & Slices
○ More Nodes , More Performance
○ Yeah its more costier !!
● Node Types
○ Dense Nodes
○ Compute Nodes
INFRA Level
● Choose the right Disk
○ SSD/HDD
○ Data & Clustering
○ Less Data High Performance- SSD
○ More Data - HDD
● WLM queue (Workload Management)
○ Clear concurrency & memory management
○ Allocate memory for user groups for query
execution
Data Level
● Enable Data compression
○ Reduces storage & I/O in turn increase
query performance
○ compression for table columns
● Update System Stats
○ updating system stats (Analyse for every
data update)
○ Ease query plan
Data Level
● Clean up the data before
loading.
○ EMR
○ Structured data
● Remove NON ASCII
○ Supports 4 byte
UTF-8
Questions
Thank you

More Related Content

Similar to RedShift-Performance turning in few clicks

MySQL Query Optimisation 101
MySQL Query Optimisation 101MySQL Query Optimisation 101
MySQL Query Optimisation 101
Federico Razzoli
 
Database design best practices
Database design best practicesDatabase design best practices
Database design best practices
Elnur Jabarov
 
Hadoop and cassandra
Hadoop and cassandraHadoop and cassandra
Hadoop and cassandra
Christina Yu
 
How MySQL can boost (or kill) your application v2
How MySQL can boost (or kill) your application v2How MySQL can boost (or kill) your application v2
How MySQL can boost (or kill) your application v2
Federico Razzoli
 
Postgre sql 10 table partitioning
Postgre sql 10  table partitioningPostgre sql 10  table partitioning
Postgre sql 10 table partitioning
Marek Hudyma
 
MySQL performance tuning
MySQL performance tuningMySQL performance tuning
MySQL performance tuning
Anurag Srivastava
 
How to leave the ORM at home and write SQL
How to leave the ORM at home and write SQLHow to leave the ORM at home and write SQL
How to leave the ORM at home and write SQL
MariaDB plc
 
CloudCamp Chicago lightning talk "Building warehousing systems on Redshi...
CloudCamp Chicago lightning talk      "Building warehousing systems on Redshi...CloudCamp Chicago lightning talk      "Building warehousing systems on Redshi...
CloudCamp Chicago lightning talk "Building warehousing systems on Redshi...
CloudCamp Chicago
 
Ledingkart Meetup #2: Scaling Search @Lendingkart
Ledingkart Meetup #2: Scaling Search @LendingkartLedingkart Meetup #2: Scaling Search @Lendingkart
Ledingkart Meetup #2: Scaling Search @Lendingkart
Mukesh Singh
 
Steam Learn: Introduction to RDBMS indexes
Steam Learn: Introduction to RDBMS indexesSteam Learn: Introduction to RDBMS indexes
Steam Learn: Introduction to RDBMS indexes
inovia
 
Correctly Loading Incremental Data at Scale
Correctly Loading Incremental Data at ScaleCorrectly Loading Incremental Data at Scale
Correctly Loading Incremental Data at Scale
Alluxio, Inc.
 
IBM DB2 for z/OS Administration Basics
IBM DB2 for z/OS Administration BasicsIBM DB2 for z/OS Administration Basics
IBM DB2 for z/OS Administration Basics
IBM
 
Avoiding Pitfalls for Cassandra.pdf
Avoiding Pitfalls for Cassandra.pdfAvoiding Pitfalls for Cassandra.pdf
Avoiding Pitfalls for Cassandra.pdf
Cédrick Lunven
 
M|18 Why Abstract Away the Underlying Database Infrastructure
M|18 Why Abstract Away the Underlying Database InfrastructureM|18 Why Abstract Away the Underlying Database Infrastructure
M|18 Why Abstract Away the Underlying Database Infrastructure
MariaDB plc
 
Meet the-other-elephant
Meet the-other-elephantMeet the-other-elephant
Meet the-other-elephant
Stefanie Janine Stölting
 
Cassandra 2.1 boot camp, Compaction
Cassandra 2.1 boot camp, CompactionCassandra 2.1 boot camp, Compaction
Cassandra 2.1 boot camp, Compaction
Joshua McKenzie
 
Mongo nyc nyt + mongodb
Mongo nyc nyt + mongodbMongo nyc nyt + mongodb
Mongo nyc nyt + mongodb
Deep Kapadia
 
PHP & Mysql Code optimization
PHP & Mysql Code optimizationPHP & Mysql Code optimization
PHP & Mysql Code optimization
Abu Saleh Muhammad Shaon
 
Learn how zheap works
 Learn how zheap works Learn how zheap works
Learn how zheap works
EDB
 
Learn how zheap works
 Learn how zheap works Learn how zheap works
Learn how zheap works
EDB
 

Similar to RedShift-Performance turning in few clicks (20)

MySQL Query Optimisation 101
MySQL Query Optimisation 101MySQL Query Optimisation 101
MySQL Query Optimisation 101
 
Database design best practices
Database design best practicesDatabase design best practices
Database design best practices
 
Hadoop and cassandra
Hadoop and cassandraHadoop and cassandra
Hadoop and cassandra
 
How MySQL can boost (or kill) your application v2
How MySQL can boost (or kill) your application v2How MySQL can boost (or kill) your application v2
How MySQL can boost (or kill) your application v2
 
Postgre sql 10 table partitioning
Postgre sql 10  table partitioningPostgre sql 10  table partitioning
Postgre sql 10 table partitioning
 
MySQL performance tuning
MySQL performance tuningMySQL performance tuning
MySQL performance tuning
 
How to leave the ORM at home and write SQL
How to leave the ORM at home and write SQLHow to leave the ORM at home and write SQL
How to leave the ORM at home and write SQL
 
CloudCamp Chicago lightning talk "Building warehousing systems on Redshi...
CloudCamp Chicago lightning talk      "Building warehousing systems on Redshi...CloudCamp Chicago lightning talk      "Building warehousing systems on Redshi...
CloudCamp Chicago lightning talk "Building warehousing systems on Redshi...
 
Ledingkart Meetup #2: Scaling Search @Lendingkart
Ledingkart Meetup #2: Scaling Search @LendingkartLedingkart Meetup #2: Scaling Search @Lendingkart
Ledingkart Meetup #2: Scaling Search @Lendingkart
 
Steam Learn: Introduction to RDBMS indexes
Steam Learn: Introduction to RDBMS indexesSteam Learn: Introduction to RDBMS indexes
Steam Learn: Introduction to RDBMS indexes
 
Correctly Loading Incremental Data at Scale
Correctly Loading Incremental Data at ScaleCorrectly Loading Incremental Data at Scale
Correctly Loading Incremental Data at Scale
 
IBM DB2 for z/OS Administration Basics
IBM DB2 for z/OS Administration BasicsIBM DB2 for z/OS Administration Basics
IBM DB2 for z/OS Administration Basics
 
Avoiding Pitfalls for Cassandra.pdf
Avoiding Pitfalls for Cassandra.pdfAvoiding Pitfalls for Cassandra.pdf
Avoiding Pitfalls for Cassandra.pdf
 
M|18 Why Abstract Away the Underlying Database Infrastructure
M|18 Why Abstract Away the Underlying Database InfrastructureM|18 Why Abstract Away the Underlying Database Infrastructure
M|18 Why Abstract Away the Underlying Database Infrastructure
 
Meet the-other-elephant
Meet the-other-elephantMeet the-other-elephant
Meet the-other-elephant
 
Cassandra 2.1 boot camp, Compaction
Cassandra 2.1 boot camp, CompactionCassandra 2.1 boot camp, Compaction
Cassandra 2.1 boot camp, Compaction
 
Mongo nyc nyt + mongodb
Mongo nyc nyt + mongodbMongo nyc nyt + mongodb
Mongo nyc nyt + mongodb
 
PHP & Mysql Code optimization
PHP & Mysql Code optimizationPHP & Mysql Code optimization
PHP & Mysql Code optimization
 
Learn how zheap works
 Learn how zheap works Learn how zheap works
Learn how zheap works
 
Learn how zheap works
 Learn how zheap works Learn how zheap works
Learn how zheap works
 

RedShift-Performance turning in few clicks

  • 1. RedShift-Performance Tuning In Few Clicks Sadagopan.K.V
  • 2. Performance Tuning Levels ● Table Design ● Query ● INFRA level (Clusters) ● Data migration
  • 3. Performance Tuning - Redshift Figure out the requirement
  • 4. Table Design ● Felicitous distribution style ○ ALL ○ KEY ○ EVEN Use DISTSTYLE ALL only when the table is not big. ● Tag the correct DISTKEY ○ Helps in data distribution. ○ Plays a key role in self joins
  • 5. Table Design-Contd ● SORTKEY ○ Use the option of multiple sort keys ○ Date,timestamp,count etc. ○ Correctly sorted tables will easy work for self joins ● Primary Key & Foreign key ○ Used by query planner ○ Helps in faster self joins
  • 6. Querying ● Allergic to SELECT * ○ Reduces Scan time & I/O ○ Easy query plan ● EXPLAIN command to view the query plan
  • 7. Querying-contd ● Query Queues ○ Avoid execution bottlenecks ○ High response ● Don’t use Cross-joins unless absolutely necessary ○ reduces nested loops & faster the execution
  • 8. Querying-contd ● Use CASE expression ○ similar to if/then/else ○ Avoids multiple selects
  • 9. INFRA Level ● Nodes , Processors & Slices ○ More Nodes , More Performance ○ Yeah its more costier !! ● Node Types ○ Dense Nodes ○ Compute Nodes
  • 10. INFRA Level ● Choose the right Disk ○ SSD/HDD ○ Data & Clustering ○ Less Data High Performance- SSD ○ More Data - HDD ● WLM queue (Workload Management) ○ Clear concurrency & memory management ○ Allocate memory for user groups for query execution
  • 11. Data Level ● Enable Data compression ○ Reduces storage & I/O in turn increase query performance ○ compression for table columns ● Update System Stats ○ updating system stats (Analyse for every data update) ○ Ease query plan
  • 12. Data Level ● Clean up the data before loading. ○ EMR ○ Structured data ● Remove NON ASCII ○ Supports 4 byte UTF-8