redshift-performance turning in few clicks

14
RedShift-Performance Tuning In Few Clicks Sadagopan.K.V

Upload: sadagopan-iyengar

Post on 21-Jan-2017

56 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: RedShift-Performance turning in few clicks

RedShift-Performance Tuning In Few Clicks

Sadagopan.K.V

Page 2: RedShift-Performance turning in few clicks

Performance Tuning Levels

● Table Design ● Query● INFRA level

(Clusters)● Data migration

Page 3: RedShift-Performance turning in few clicks

Performance Tuning - Redshift

Figure out the requirement

Page 4: RedShift-Performance turning in few clicks

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

Page 5: RedShift-Performance turning in few clicks

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

Page 6: RedShift-Performance turning in few clicks

Querying

● Allergic to SELECT * ○ Reduces Scan time & I/O

○ Easy query plan

● EXPLAIN command to view the query plan

Page 7: RedShift-Performance turning in few clicks

Querying-contd● Query Queues

○ Avoid execution bottlenecks

○ High response

● Don’t use Cross-joins unless absolutely necessary ○ reduces nested loops & faster the

execution

Page 8: RedShift-Performance turning in few clicks

Querying-contd● Use CASE expression

○ similar to if/then/else○ Avoids multiple selects

Page 9: RedShift-Performance turning in few clicks

INFRA Level● Nodes , Processors & Slices

○ More Nodes , More Performance

○ Yeah its more costier !!

● Node Types○ Dense Nodes

○ Compute Nodes

Page 10: RedShift-Performance turning in few clicks

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

Page 11: RedShift-Performance turning in few clicks

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

Page 12: RedShift-Performance turning in few clicks

Data Level● Clean up the data before

loading.○ EMR ○ Structured data

● Remove NON ASCII ○ Supports 4 byte

UTF-8

Page 13: RedShift-Performance turning in few clicks

Questions

Page 14: RedShift-Performance turning in few clicks

Thank you