20070925 Highload2007 Momjian Features

11

Click here to load reader

Transcript of 20070925 Highload2007 Momjian Features

Page 1: 20070925 Highload2007 Momjian Features

Upcoming PostgreSQL Performance Features

BRUCE MOMJIAN,ENTERPRISEDB

September, 2007

AbstractThis outlines the upcoming performance features of PostgreSQL 8.3.

Page 2: 20070925 Highload2007 Momjian Features

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

Page 3: 20070925 Highload2007 Momjian Features

Update Without Heap Only Tuples (HOT)

3

Item3

UPDATE2

Special

8K

INSERTUPDATE1

Index

Item1 Item2

1 2

Page Header

Upcoming PostgreSQL Features 2

Page 4: 20070925 Highload2007 Momjian Features

Update With Heap Only Tuples (HOT)

UPDATE2

Item3

Special

8K

UPDATE1

Index

Item1 Item2

1

Page Header

Upcoming PostgreSQL Features 3

Page 5: 20070925 Highload2007 Momjian Features

Asynchronous Commit And

Checkpoint Smoothing

Upcoming PostgreSQL Features 4

Page 6: 20070925 Highload2007 Momjian Features

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

Page 7: 20070925 Highload2007 Momjian Features

Autovacuum On By Default

Autovacuum

Dead

Dead

DeadDead

Dead

DeadDead

Dead

Upcoming PostgreSQL Features 6

Page 8: 20070925 Highload2007 Momjian Features

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

Page 9: 20070925 Highload2007 Momjian Features

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

Page 10: 20070925 Highload2007 Momjian Features

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

Page 11: 20070925 Highload2007 Momjian Features

Questions?

Upcoming PostgreSQL Features 10