Tag: query-optimization
23 Posts
Flask: Use hybrid_property to Compute on the Model and Filter Right in the Query
Django: Sort QuerySets the Right Way with order_by() and Meta.ordering in 5 Minutes
Django: Roll Back Part of a Transaction with Savepoints — Stop Losing the Whole Batch When One Row Fails
Django: Use @cached_property to Compute Once and Reuse Many Times in a Model
Django: Add Extra Fields to a ManyToMany Relationship with a Through Model in 5 Minutes
Django: Use get_object_or_404() Instead of try/except DoesNotExist — Return a Proper 404 in One Line
Django: Use Raw SQL Safely When the ORM Isn’t Enough — objects.raw() and cursor() in 5 Minutes
Django: Bulk Update with QuerySet.update() in a Single SQL Statement — No save() Loop
