-
Notifications
You must be signed in to change notification settings - Fork 73
Performance
Thomas Pollet edited this page May 2, 2020
·
2 revisions
Fetching an instance without relationship data is very fast (~10ms). However, you may incur a performance hit fetching collections and relationships, depending on your database configuration. If you are worried about performance, you should take good care fine-tuning your database and SQLAlchemy model queries.
A database table count()
is executed when retrieving a collection. For very large tables this may become slow. The count()
can be avoided by overriding the SAFRSBase._s_count
property. When this property has been defined, the value returned by s_count
will be returned in the collection json meta
section.