Penyimpanan baris vs kolom
Konsep Data Warehousing
Aaren Stubberfield
Data Scientist
Mengapa penting?
- Mengoptimalkan kueri untuk kecepatan
- Format penyimpanan kolom untuk tabel gudang data paling cocok untuk analitik
Dasar penyimpanan komputer
- Komputer menyimpan data dalam blok.
- Membaca blok yang diperlukan saat mengambil data.
- Membaca lebih sedikit blok mempercepat proses.
Contoh tabel kesehatan
- CDC (Centers for Disease Control and Prevention)
- Data infeksi flu per kelompok usia lintas beberapa musim
| MUSIM |
KELOMPOK USIA |
PERSENTASE RAWAT INAP |
| 2019 |
0–17 th |
13,9% |
| 2019 |
18–49 th |
22,5% |
| 2019 |
50+ th |
63,7% |
| 2020 |
0–17 th |
3,9% |
| 2020 |
18–49 th |
18,1% |
| 2020 |
50+ th |
78% |
| 2021 |
0–17 th |
15,6% |
| 2021 |
18–49 th |
23,3% |
| 2021 |
50+ th |
61,1% |
Contoh penyimpanan baris
| MUSIM |
KELOMPOK USIA |
PERSENTASE RAWAT INAP |
| 2019 |
0–17 th |
13,9% |
| 2019 |
18–49 th |
22,5% |
| 2019 |
50+ th |
63,7% |
| 2020 |
0–17 th |
3,9% |
| 2020 |
18–49 th |
18,1% |
| 2020 |
50+ th |
78% |
| 2021 |
0–17 th |
15,6% |
| 2021 |
18–49 th |
23,3% |
| 2021 |
50+ th |
61,1% |
Contoh penyimpanan kolom
| MUSIM |
KELOMPOK USIA |
PERSENTASE RAWAT INAP |
| 2019 |
0–17 th |
13,9% |
| 2019 |
18–49 th |
22,5% |
| 2019 |
50+ th |
63,7% |
| 2020 |
0–17 th |
3,9% |
| 2020 |
18–49 th |
18,1% |
| 2020 |
50+ th |
78% |
| 2021 |
0–17 th |
15,6% |
| 2021 |
18–49 th |
23,3% |
| 2021 |
50+ th |
61,1% |
Ringkasan
Row Store
- Data baris disimpan bersama dalam blok
- Cocok untuk beban kerja transaksional
Column Store
- Data kolom disimpan bersama dalam blok
- Cocok untuk beban kerja analitik
- Kompresi data lebih baik
Ayo berlatih!
Konsep Data Warehousing
Preparing Video For Download...