psqlpy icon indicating copy to clipboard operation
psqlpy copied to clipboard

Benchmarking..

Open JMarkin opened this issue 1 year ago • 2 comments
trafficstars

Hello, thank you for great job.

I added your driver to pgbeanch from MagicStack team. And result super different then your. Full report https://public.jmarkin.ru/pgbeanch.html

Example result image psqlpy slower than all of other driver: aiopg, psycopg, asyncpg, etc.

Can you help me understand why your beanchmark give better results?

JMarkin avatar May 20 '24 10:05 JMarkin

@JMarkin Hello! Thanks for testing the library. I'm going to look into it.
As for benchmark I made, I didn't want to show the raw performance of the library, so I tested it within FastAPI and not local PostgreSQL

As far as I know, MagicStack benchmark is a little strange cuz it shows that psycopg 5! times slower than asyncpg, I haven't seen such outperformance in any test I've made.

chandr-andr avatar May 20 '24 10:05 chandr-andr

@JMarkin Plus, you can check this issue (https://github.com/piccolo-orm/piccolo/issues/986) with some discussion with the piccolo-orm creator and member, where we've tested asyncpg and psqlpy performance.
The difference isn't big (I explained why) but it's here.

Last but not least, you can check this repo https://github.com/ymezencev/db_perf, it uses the old version of psqlpy, but it beats the asyncpg.

chandr-andr avatar May 20 '24 10:05 chandr-andr

Moved to discussions

chandr-andr avatar Jul 04 '24 10:07 chandr-andr