Hacker News new | ask | show | jobs
by nchmy 60 days ago
How about pg on Unix socket?
1 comments

    Running 100,000 `SELECT 1` queries:
    PostgreSQL (localhost): 2.84 seconds
    PostgreSQL (Unix socket): 1.93 seconds
    SQLite (in-memory): 0.07 seconds
    SQLite (tempfile): 0.06 seconds
(https://gist.github.com/leifkb/b940b8cdd8e0432cc58670bbc0c33...)
You appear to have benchmarked how quickly Python can access memory vs how quickly Python can open and close a socket. I'm not sure the DBs were required in any way.
seems about right