Django's ORM is pretty slow. Sometimes Django can spend more time *building the SQL* than actually fetching a singular object.
SQLAlchemy has this https://docs.sqlalchemy.org/en/14/orm/extensions/baked.html Which has been moved into SQLAlchemy core. https://docs.sqlalchemy.org/en/14/core/connections.html#sql-caching Are there any extensions that can do this in Django, or a safe way to do this simply? Conceptually I'd need to stick and LRU cache around the query compiler. It seems like something that someone must have done already. Rollo -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/e1cecefc-c593-470d-8683-cd5b7202441cn%40googlegroups.com.