PostgreSQL:Performance
PostgreSQL 성능 튜닝.
일반
-
PRIMARY KEY명시 - https://www.postgresql.org/docs/current/ddl-constraints.html — "every table should have a primary key" -
UNIQUE제약의 중복 인덱스 제거 - https://www.postgresql.org/docs/current/indexes-unique.html — UNIQUE 제약 시 자동으로 인덱스 생성
보안 관련
-
SECURITY DEFINER+ search_path - https://wiki.postgresql.org/wiki/A_Guide_to_CVE-2018-1058:_Protect_Your_Search_Path — search_path 조작을 통한 권한 탈취 취약점
성능 관련
-
(SELECT auth.uid())캐싱 - https://supabase.com/docs/guides/troubleshooting/rls-performance-and-best-practices-Z5Jjwv — SELECT 래핑으로 initPlan 캐싱 -
(SELECT is_admin())래핑 - https://github.com/orgs/supabase/discussions/14576 — 정책 내 함수 호출도 동일한 SELECT 래핑 패턴 적용 권장
See also
Favorite site
- PostgreSQL Configuration #기본튜닝
- PostgreSQL Performance Tuning Tutorial
- SlideShare - (Pgday.Seoul 2017) 7. PostgreSQL DB Tuning 기업사례 - 송춘자
- PostgreSQL HA 구성 -1. Streaming Replication
- 읽기전용 PostgreSQL 튜닝.
- (PostgreSQL) PostgreSQL 모니터링 SQL 정리
- Postgres 쿼리 1,000배 더 빠르게 만들기 | GeekNews