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
Originally posted by syniex February 27, 2024
Currently, when retrieving results from a database, many of us construct dictionaries from lists of tuples to provide a more convenient API for working with the data. This approach is common but might not be the most efficient.
We could create a Record class in Cython that encapsulates the data returned from the database. This class would allow for easier access to column values and could potentially offer performance benefits over the current approach of using dictionaries.
I am still thinking about it. I need some time to determine how much of a performance hit this would incur. Assuming that is too much of a hit I have some other thoughts on how to allow for an easy opt-in for those who want it -- but I need some time to do some research on these matters. I haven't forgotten about it, though!
Discussed in #301
Originally posted by syniex February 27, 2024
Currently, when retrieving results from a database, many of us construct dictionaries from lists of tuples to provide a more convenient API for working with the data. This approach is common but might not be the most efficient.
We could create a Record class in Cython that encapsulates the data returned from the database. This class would allow for easier access to column values and could potentially offer performance benefits over the current approach of using dictionaries.
asyncpg Record API Documentation
The text was updated successfully, but these errors were encountered: