3 ms·
The asyncpg library is honestly incredible. I wrote a backfill script that would: 1. dump the rows of a postgres table matching a query (usually a range on the
by pantsforbirds 6y ago
The asyncpg library is honestly incredible. I wrote a backfill script that would:
1. dump the rows of a postgres table matching a query (usually a range on the index with a filter or two on other columns)
2. Do some very basic transformation on the rows (few replaces with small regex)
3. Take each transformed row and dump into a rabbitmq queue.
I was using aio-pika for the rabbit queue and asyncpg and was getting a consistent 25k messages/sec for like 200 lines of code.