Replies: 1 comment 1 reply
-
@edimedia, the Consider a case where you have passed in a Depending on the database engine you are using, Advanced Alchemy will either add in the row count with a analytical window statement. This lets us get the limited rows and the total count in a single query. Otherwise, it issues 2 queries. 1 for the total count, and 1 for the data requested. Hope this helps. |
Beta Was this translation helpful? Give feedback.
-
Hi! I want to know why the authors chose to make a count request to the DB instead of using
len(instances)
.https://github.com/litestar-org/advanced-alchemy/blob/24f7237ee024aa531ac54507cc66f5786245231f/advanced_alchemy/repository/_async.py#L1081
instead of
I apologize if this question is not appropriate for this context.
Beta Was this translation helpful? Give feedback.
All reactions