Closed
Description
I made my own benchmark between psqlpy vs psycopg you can found the comparison and code in this github repo https://github.com/BimaAdi/psqlpy-vs-psycopg. I made 2 use case
- Insert bulk (insert many data in one transaction)
- Get many (get many data from database)
I found that psqlpy is slower than psycopg. Here the result (all in second):
Insert Bulk Time
psqlpy | psycopg | |
---|---|---|
1 | 0.271 | 0.096 |
2 | 0.269 | 0.184 |
3 | 0.319 | 0.216 |
4 | 0.38 | 0.097 |
5 | 0.378 | 0.117 |
6 | 0.288 | 0.139 |
7 | 0.287 | 0.159 |
8 | 0.267 | 0.101 |
9 | 0.285 | 0.107 |
10 | 0.448 | 0.181 |
avg | 0.319 | 0.14 |
Get Bulk Time
psqlpy | psycopg | |
---|---|---|
1 | 0.002 | 0.002 |
2 | 0.005 | 0.003 |
3 | 0.004 | 0.004 |
4 | 0.002 | 0.002 |
5 | 0.005 | 0.002 |
6 | 0.002 | 0.002 |
7 | 0.002 | 0.003 |
8 | 0.003 | 0.002 |
9 | 0.003 | 0.002 |
10 | 0.003 | 0.002 |
avg | 0.003 | 0.002 |
Machine spec
- intel core i7 9th gen
- 16 gb RAM
- SSD
Although by only small margin but psycopg consitently beat psqlpy. What's wrong with my benchmark? did I do something wrong? or maybe due to other factor?
Metadata
Metadata
Assignees
Labels
No labels