[PATCH]Tablesample Submission

From: Qi Huang <huangqiyx(at)outlook(dot)com>
To: "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: [PATCH]Tablesample Submission
Date: 2012-08-21 01:52:27
Message-ID: BAY002-W5461E1767E36C62C8FA47B0B80@phx.gbl
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi, hackers
I made the final version tablesample patch. It is implementing SYSTEM and BERNOULLI sample method, which is basically "feature-complete". The regression test is also included in this patch.
There is an wiki documentation on https://wiki.postgresql.org/wiki/TABLESAMPLE_Implementation. The detail about this patch and this project is all included in this documentation.
The pgbench test result below:
Without patch:
transaction
type: SELECT only

scaling
factor: 10

query
mode: simple

duration:
30 s

number of
clients: 2

number of
threads: 2

number of
transactions actually processed: 304857

tps =
10161.803463 (including connections establishing)

tps =
10162.963554 (excluding connections establishing)

number of
clients: 4

number of
threads: 2

number of
transactions actually processed: 245072

tps =
8168.796552 (including connections establishing)

tps =
8173.947876 (excluding connections establishing)

number of
clients: 8

number of
threads: 2

number of
transactions actually processed: 218426

tps =
7280.624465 (including connections establishing)

tps =
7284.863386 (excluding connections establishing)

scaling
factor: 10

number of
clients: 16

number of
threads: 2

number of
transactions actually processed: 199204

tps =
6636.427331 (including connections establishing)

tps =
6650.783233 (excluding connections establishing)

scaling
factor: 10

number of
clients: 32

number of
threads: 2

number of
transactions actually processed: 186793

tps =
6221.025810 (including connections establishing)

tps =
6238.904071 (excluding connections establishing)

With Patch:
number of clients: 2
number of threads: 2
number of transactions actually processed: 329926
tps = 10997.232742 (including connections establishing)
tps = 10998.712762 (excluding connections establishing)
number of clients: 4
number of threads: 2
number of transactions actually processed: 261993
tps = 8732.875565 (including connections establishing)
tps = 8735.013550 (excluding connections establishing)
number of clients: 8
number of threads: 2
number of transactions actually processed: 203579
tps = 6785.601601 (including connections establishing)
tps = 6788.043016 (excluding connections establishing)
number of clients: 16
number of threads: 2
number of transactions actually processed: 190773
tps = 6354.824262 (including connections establishing)
tps = 6361.348206 (excluding connections establishing)
number of clients: 32
number of threads: 2
number of transactions actually processed: 190801
tps = 6353.821626 (including connections establishing)
tps = 6380.813409 (excluding connections establishing)

Thanks and Best RegardsHuang Qi VictorComputer Science of National University of Singapore

Attachment Content-Type Size
tablesample_context.patch application/octet-stream 99.7 KB

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tatsuo Ishii 2012-08-21 03:16:11 TODO
Previous Message Joshua D. Drake 2012-08-21 00:35:21 Re: sha1, sha2 functions into core?