You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm currently upserting around 2.5 million rows to Postgres. I replaced my previous use of Sqlalchemy + psycopg2 with Asyncpg, but I'm not seeing the performance gains I expected. I have a complex query statement that utilizes ON CONFLICT to upset. SQLalchemy has an ORM method for this, but I don't see anything equivalent in the Asyncpg docs. I currently use executemany and pass a list of tuples that were converted from a Pandas data frame. I don't think I would be able to perform my upset function using copy_records_to_table, can you advise on how to approach this with Asyncpg?
The text was updated successfully, but these errors were encountered:
Hi,
I'm currently upserting around 2.5 million rows to Postgres. I replaced my previous use of Sqlalchemy + psycopg2 with Asyncpg, but I'm not seeing the performance gains I expected. I have a complex query statement that utilizes ON CONFLICT to upset. SQLalchemy has an ORM method for this, but I don't see anything equivalent in the Asyncpg docs. I currently use executemany and pass a list of tuples that were converted from a Pandas data frame. I don't think I would be able to perform my upset function using copy_records_to_table, can you advise on how to approach this with Asyncpg?
The text was updated successfully, but these errors were encountered: