Booster's Blog

PostgreSQL engineering notes

Posts WIKI About me Photos Repositories

PostgreSQL Protocol Comparison Test

Comparing Simple vs Extended protocol for pgx and pq drivers.

Requirements

Run Test

make run

Results

| Driver | Protocol | Bytes Read | Difference |
|--------|----------|------------|------------|
| pgx    | simple   | 17,747,491 | baseline   |
| pgx    | extended |  9,638,726 | -45.7%     |
| pq     | simple   | 17,786,878 | baseline   |
| pq     | extended | 17,795,080 | +0.05%     |

Key finding: pgx + extended protocol = 45.7% traffic reduction

Other Commands