PostgreSQL'de Sorgu Performansını İyileştirme
Amy McCarty
Instructor
Satır odaklı depolama
Sütun odaklı depolama
| id | name | species | age | habitat | received |
|---|---|---|---|---|---|
| 01 | Bob | panda | 2 | Asia | 2018 |
| 02 | Sunny | zebra | 3 | Africa | 2018 |
| 03 | Beco | zebra | 10 | Africa | 2017 |
| 04 | Coco | koala | 5 | Australia | 2016 |
Satır odaklı depolama
| id | name | species | age | habitat | received |
|---|---|---|---|---|---|
| 01 | Bob | panda | 2 | Asia | 2018 |
Sütun odaklı depolama

Satır sayısını azaltın
WHERE filtresiINNER JOINDISTINCTLIMITBölümler (partitions)
Dizinler (indexes)
Bölümler ve dizinleri kullanma


SELECT species
FROM zoo_animals
WHERE habitat = 'Africa'
Ne
Neden
Nerede
Sorgu planlayıcı

EXPLAIN
SELECT species
FROM zoo_animals
WHERE habitat = 'Africa'
Sorgu Planı
Seq Scan on zoo_animals (cost=0.00..
17.70 rows=2 width=182)
Filter: (state_code = 15)
PostgreSQL'de Sorgu Performansını İyileştirme