A database result set is the collection of rows produced by a query. With asyncpg, fetch loads all rows into memory as asyncpg Record objects, whose fields can be accessed by column name. section 5.4
Choose the retrieval approach according to the result set’s size and access needs:
- Use fetch() for all rows, or fetchrow() when a single record is expected. section 5.4
- Use a cursor to stream large result sets incrementally, reducing application memory use while increasing database network round trips. section 5.7
Selecting brands
After inserting two brands, fetch() returns records that can be printed by column name: id: 1, name: Levis; id: 2, name: Seven.



