Performance Benchmarks
Here you can find the results of the performance tests run on each Zenifra PostgreSQL database plan.
Test Methodology
Benchmarks were run using a Node.js script with the postgres library:
- Parallel threads: 50 simultaneous connections
- Dataset: 5,000 customers, 1,000 products, 50,000 orders
- Write tests: 56,000 parallel INSERTs
- Read tests: 6 heavy queries run in parallel (JOINs, CTEs, window functions, aggregations)
- Iterations: 5 runs per query (average)
Results by Plan
DB Free
| Metric | Value |
|---|---|
| INSERT/second | 137 |
| SELECT/second | ~1 |
| Average INSERT latency | 99ms |
| Average SELECT latency | 5.3s (heavy queries) |
| Test threads | 20 |
| Concurrent connections | up to 50 |
DB Starter
| Metric | Value |
|---|---|
| INSERT/second | 678 |
| SELECT/second | ~5 |
| Average INSERT latency | 23ms |
| Average SELECT latency | 1.3s (heavy queries) |
| Test threads | 20 |
| Concurrent connections | up to 25 |
DB Basic
| Metric | Value |
|---|---|
| INSERT/second | 2,239 |
| SELECT/second | ~13 |
| Average INSERT latency | 20ms |
| Average SELECT latency | 477ms (heavy queries) |
| Test threads | 50 |
| Concurrent connections | up to 50 |
DB Premium
| Metric | Value |
|---|---|
| INSERT/second | 3,947 |
| SELECT/second | ~12 |
| Average INSERT latency | 18ms |
| Average SELECT latency | 487ms (heavy queries) |
| Test threads | 70 |
| Concurrent connections | up to 100 |
DB Enterprise
| Metric | Value |
|---|---|
| INSERT/second | 11,292 |
| SELECT/second | ~12 |
| Average INSERT latency | 69ms |
| Average SELECT latency | 496ms (heavy queries) |
| Test threads | 500 |
| Concurrent connections | up to 480 |
Test details:
- INSERT: 56,000 records in 4.96s (500 parallel threads)
- SELECT: 6 heavy queries run in parallel (multiple JOINs, CTEs, window functions, aggregations)
Performance Charts
INSERTs per second by plan
Performance Summary
- DB Enterprise is 82x faster than DB Free in INSERTs
- DB Premium achieves 28x more INSERTs/s than DB Free
- DB Basic exceeds DB Free by 16x
- Progressive improvement between each plan
Performance summary:
- DB Enterprise is 82x faster than DB Free in INSERT operations
- DB Premium achieves 28x more INSERTs/s than DB Free
- DB Basic exceeds DB Free by 16x
- There is progressive improvement between plans
Average latency by plan
Latency Analysis
- DB Premium has the lowest latency (18ms)
- DB Enterprise has higher latency (69ms) due to high throughput
- Latency is 5x lower from Free to Premium
- Trade-off: more performance = slightly higher latency
Latency analysis:
- DB Premium has the lowest latency (18ms)
- DB Enterprise has higher latency (69ms) due to its high throughput
- Latency is 5x lower from Free to Premium
- There is a trade-off: more performance can mean slightly higher latency
Performance Comparison
| Plan | INSERT/s | SELECT/s (Heavy/Complex Queries) | Latency |
|---|---|---|---|
| DB Free | 137 | ~1 | 99ms |
| DB Starter | 678 | ~5 | 23ms |
| DB Basic | 2,239 | ~13 | 20ms |
| DB Premium | 3,947 | ~12 | 18ms |
| DB Enterprise | 11,292 | ~12 | 69ms |
Factors That Affect Performance
- Number of connections: Many simultaneous connections can degrade performance
- Indexes: Queries without indexes are significantly slower
- Dataset size: Larger datasets can affect response time
Optimization Tips
- Use proper indexes for your queries
- Use read replicas for SELECT queries
- Configure connection pooling for better connection management
- Monitor logs and metrics (available starting from the Premium plan)
Note: Benchmark values can vary depending on workload and specific configuration.