RedShift-Performance turning in few clicks
-
Upload
sadagopan-iyengar -
Category
Documents
-
view
56 -
download
0
Transcript of RedShift-Performance turning in few clicks
![Page 1: RedShift-Performance turning in few clicks](https://reader035.fdocuments.us/reader035/viewer/2022062400/5882b78f1a28abd75a8b7723/html5/thumbnails/1.jpg)
RedShift-Performance Tuning In Few Clicks
Sadagopan.K.V
![Page 2: RedShift-Performance turning in few clicks](https://reader035.fdocuments.us/reader035/viewer/2022062400/5882b78f1a28abd75a8b7723/html5/thumbnails/2.jpg)
Performance Tuning Levels
● Table Design ● Query● INFRA level
(Clusters)● Data migration
![Page 3: RedShift-Performance turning in few clicks](https://reader035.fdocuments.us/reader035/viewer/2022062400/5882b78f1a28abd75a8b7723/html5/thumbnails/3.jpg)
Performance Tuning - Redshift
Figure out the requirement
![Page 4: RedShift-Performance turning in few clicks](https://reader035.fdocuments.us/reader035/viewer/2022062400/5882b78f1a28abd75a8b7723/html5/thumbnails/4.jpg)
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](https://reader035.fdocuments.us/reader035/viewer/2022062400/5882b78f1a28abd75a8b7723/html5/thumbnails/5.jpg)
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](https://reader035.fdocuments.us/reader035/viewer/2022062400/5882b78f1a28abd75a8b7723/html5/thumbnails/6.jpg)
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](https://reader035.fdocuments.us/reader035/viewer/2022062400/5882b78f1a28abd75a8b7723/html5/thumbnails/7.jpg)
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](https://reader035.fdocuments.us/reader035/viewer/2022062400/5882b78f1a28abd75a8b7723/html5/thumbnails/8.jpg)
Querying-contd● Use CASE expression
○ similar to if/then/else○ Avoids multiple selects
![Page 9: RedShift-Performance turning in few clicks](https://reader035.fdocuments.us/reader035/viewer/2022062400/5882b78f1a28abd75a8b7723/html5/thumbnails/9.jpg)
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](https://reader035.fdocuments.us/reader035/viewer/2022062400/5882b78f1a28abd75a8b7723/html5/thumbnails/10.jpg)
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](https://reader035.fdocuments.us/reader035/viewer/2022062400/5882b78f1a28abd75a8b7723/html5/thumbnails/11.jpg)
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](https://reader035.fdocuments.us/reader035/viewer/2022062400/5882b78f1a28abd75a8b7723/html5/thumbnails/12.jpg)
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](https://reader035.fdocuments.us/reader035/viewer/2022062400/5882b78f1a28abd75a8b7723/html5/thumbnails/13.jpg)
Questions
![Page 14: RedShift-Performance turning in few clicks](https://reader035.fdocuments.us/reader035/viewer/2022062400/5882b78f1a28abd75a8b7723/html5/thumbnails/14.jpg)
Thank you