20070925 Highload2007 Momjian Features

Post on 18-May-2015

385 views 0 download

Transcript of 20070925 Highload2007 Momjian Features

Upcoming PostgreSQL Performance Features

BRUCE MOMJIAN,ENTERPRISEDB

September, 2007

AbstractThis outlines the upcoming performance features of PostgreSQL 8.3.

PostgreSQL Evolution

11 Years

2007

1986

1996

1998

2001

Crash EnterpriseSQL Standards

Enterprise features include:

� Improved Performance

� Simplified Maintenance and Administration

� Efficient 24/7 Operation

Upcoming PostgreSQL Features 1

Update Without Heap Only Tuples (HOT)

3

Item3

UPDATE2

Special

8K

INSERTUPDATE1

Index

Item1 Item2

1 2

Page Header

Upcoming PostgreSQL Features 2

Update With Heap Only Tuples (HOT)

UPDATE2

Item3

Special

8K

UPDATE1

Index

Item1 Item2

1

Page Header

Upcoming PostgreSQL Features 3

Asynchronous Commit And

Checkpoint Smoothing

Upcoming PostgreSQL Features 4

Synchronized Scans

Session 1

Session 2

TA

DATA

DATA

DATA

D

TA

DATA

DATA

DATA

D

Heap

AA

A

D

TATA

DATA

DATA

DA

Upcoming PostgreSQL Features 5

Autovacuum On By Default

Autovacuum

Dead

Dead

DeadDead

Dead

DeadDead

Dead

Upcoming PostgreSQL Features 6

Short Varlena Headers

Two CHAR(1) fields, 4 bytes

Two CHAR(1) fields, 16 bytes

T padding

length

length

G

length T

G lengthpadding

Short headers used for lengths less than 128 bytes. Also, the tuple headeris now 23 bytes, 4 bytes shorter.

Upcoming PostgreSQL Features 7

Other Performance Improvements� Now possible for LIMIT with ORDER BY to return matching rows

without sorting

� New ring buffer for vacuums and large sequential scans avoids cachewiping

� Transaction ids no longer used for read-only transactions; reduces theneed for vacuum to prevent xid wrap-around

� Auto-adjusted background writer

Upcoming PostgreSQL Features 8

Other Improvements� Full Text Search (tsearch2) installed by default

� Updatable cursors (WHERE CURRENT OF)

� Data types

– SQL/XML with syntax support– UUID (universal unique identifier)– ENUM

Upcoming PostgreSQL Features 9

Questions?

Upcoming PostgreSQL Features 10