Ravindra BagaleCourses & study guides मराठी Track your progress

Ravi Sir's Cards › AWS

AWS Cloud

DISTKEY and SORTKEY

This revision card explains DISTKEY and SORTKEY. It starts from the need that wrong distribution causes broadcast joins and slow scans. It describes DISTKEY co-locates join keys across nodes; SORTKEY orders data for zone-map pruning on filters. The how-to section notes DIST on common join key; SORT on frequent filter (date); ANALYZE after load. An example on the card is orders DIST customer_id SORT order_date cuts join+filter time sharply.

DISTKEY and SORTKEY Wrong distribution causes broadcast joins and slow scans. DISTKEY co-locates join keys across nodes; SORTKEY orders data for zone-map pruning on filters. DIST on common join key; SORT on frequent filter (date); ANALYZE after load. orders DIST customer_id SORT order_date cuts join+filter time sharply.
DISTKEY and SORTKEY · Download PNG
Read card text

What this card says

Why do we need it?

Wrong distribution causes broadcast joins and slow scans.

What is it?

DISTKEY co-locates join keys across nodes; SORTKEY orders data for zone-map pruning on filters.

DISTKEY / SORTKEY

How to do it

DIST on common join key; SORT on frequent filter (date); ANALYZE after load.

Example

orders DIST customer_id SORT order_date cuts join+filter time sharply.

See all AWS revision cards