본문 바로가기
데이터 엔지니어링/DB

Postgres DB는 이렇게 생겼다!

by blog_autumn 2025. 8. 10.

 target: compare Mysql and Postgres.

1. why?

when I prepare the presentation ON timescaleDB’s func. I got interesting on Postgres.

because the TSDB is based on Postgres. So I had investigate the structure of Postgres.

 

2. feature of Postgres

  • support a variety data that doesn’t support in Mysql
    • audio, video, image ….
  • Comparing the RDBMS(mysql), these are similar on performance.
    • because two DBs have updated continuously.
    • So These days, It is difficult to say which one is better.

 

3. Structure of Postgres

  • Heap : storage file.
  • Block(page) : bundle of data.
  • Tuple : row data save type.

 

 Full-scan

  1. when full scan like(with out index, pk …., any other standards),
SELECT * FROM table where name = 'good721'

put every data on memory.


 

index-scan

 

with index.

  • query touch the index, “what is the block and index that WHERE is located”
  • deev dive, the index work with B-tree.