Let's talk!
Clients
Services
Blog
About us
Careers
Let's talk!
SOFTWARE
HOUSE
Clients
Services
MVP Development
Web Development
Staff Augmentation
Insights
Blog
Learnings
Careers
About us
Contact us
Learnings
Boost your knowledge with the insights from our expert team.
accessibility
accessibility
agile
agile
ai
ai
api
api
architecture
architecture
aws
aws
career
career
celery
celery
communication
communication
concurrency
concurrency
css
css
data
data
database
database
db
db
debug
debug
design
design
design system
design system
development
development
devops
devops
django
django
docker
docker
documentation
documentation
figma
figma
frontend
frontend
git
git
html
html
javascript
javascript
js
js
leadership
leadership
management
management
metrics
metrics
ml
ml
orm
orm
performance
performance
postgres
postgres
process
process
product
product
product design
product design
python
python
react
react
redux
redux
research
research
security
security
software
software
sql
sql
sre
sre
test
test
testing
testing
tests
tests
typescript
typescript
ui
ui
ux
ux
web
web
workflow
workflow
<p>In Postgres, "empty updates" have the same cost per row as any other update. Even if the values won't change after the <code>UPDATE</code>, the operation will still have the same performance: </p>
↗
https://dba.stackexchange.com/q/118178/139133
Flavio Juvenal
Dec 5, 2022
Topics:
orm, performance, postgres
<p>Using window functions on Django ORM </p>
↗
https://stackoverflow.com/a/49237664/7391355
Renato Vieira
Jul 7, 2022
Topics:
django, orm, sql
<p>django-pgtrigger provides primitives for configuring Postgres triggers on Django models without raw SQL in many cases: </p>
↗
https://github.com/Opus10/django-pgtrigger
Flavio Juvenal
Jun 13, 2022
Topics:
django, orm, sql, trigger
<p>Django Generic Functionality without Generic Relations: </p>
↗
https://djangotricks.blogspot.com/2022/04/generic-functionality-without-generic-relations.html
Flavio Juvenal
Apr 18, 2022
Topics:
django, orm
<p>django-raw-sugar: Turns your raw SQL into a QuerySet. </p>
↗
https://github.com/zxibizz/django-raw-sugar
Flavio Juvenal
Mar 25, 2022
Topics:
django, orm, performance, queryset, sql
<p>How Baserow lets users generate Django models on the fly: </p>
↗
https://baserow.io/blog/how-baserow-lets-users-generate-django-models
Flavio Juvenal
Mar 18, 2022
Topics:
django, model, orm
<p>Django pagination based on the seek method / keyset paging / offset-less pagination: </p>
↗
https://github.com/nitely/django-infinite-scroll-pagination
Flavio Juvenal
Mar 8, 2022
Topics:
django, orm, pagination
<p>How can I cast a DateField() + TimeField() to local time in a Django QuerySet? </p>
↗
https://stackoverflow.com/questions/69260536/how-can-i-cast-a-datefield-timefield-to-local-time-in-a-django-queryset
Flavio Juvenal
Mar 7, 2022
Topics:
datetime, django, orm, postgres, timezone
<p>How not to structure your database-backed web applications: a study of performance bugs in the wild - </p>
↗
https://blog.acolyer.org/2018/06/28/how-_not_-to-structure-your-database-backed-web-applications-a-study-of-performance-bugs-in-the-wild/
Flavio Juvenal
Nov 25, 2021
Topics:
db, orm, performance, sql
<p>In Django ORM you can add <code>order_by('?')</code> to a queryset to randomize results - but be careful because it can slow them significantly #order-by</p>
↗
https://docs.djangoproject.com/en/3.1/ref/models/querysets/
Vanessa Barreiros
Aug 17, 2020
Topics:
django, orm, python
<p>Great post on optimizing Django ORM Queries: </p>
↗
http://schegel.net/posts/optimizing-django-orm-queries/
Rebeca Sarai
May 27, 2020
Topics:
django, orm
<p>If you use iterator() to run the query, prefetch_related() calls will be ignored since these two optimizations can't be used together</p>
↗
Carlos Coelho
Nov 28, 2019
Topics:
django, orm
<p>Pushing the ORM to it's limits: </p>
↗
https://medium.com/kolonial-no-product-tech/pushing-the-orm-to-its-limits-d26d87a66d28
Rebeca Sarai
Apr 29, 2019
Topics:
django, orm
How to Use Django Bulk Inserts for Greater Efficiency
↗
https://www.caktusgroup.com/blog/2019/01/09/django-bulk-inserts/
Gustavo Carvalho
Jan 14, 2019
Topics:
django, orm
<p>Excellent article about how ORMs cause leaky abstractions that lead to performance issues and how fixing them is generally simple: </p>
↗
https://blog.acolyer.org/2018/06/28/how-_not_-to-structure-your-database-backed-web-applications-a-study-of-performance-bugs-in-the-wild/
Flávio Juvenal
Jun 30, 2018
Topics:
db, orm, performance
<p>If you need to get only one field from a related model you should use annotate </p>
↗
https://stackoverflow.com/questions/35524259/selecting-specific-fields-using-select-related-in-django
Anderson Resende
Feb 21, 2018
Topics:
django, orm
<p>How to create symmetrical relationships in Django using ManyToMany's "through" </p>
↗
http://charlesleifer.com/blog/self-referencing-many-many-through/
Luca Bezerra
Oct 25, 2017
Topics:
django, orm, symmetrical
<p>You can pass a queryset to prefetch_related (and select_related): <code>Restaurant.objects.prefetch_related(Prefetch('pizzas__toppings'))</code> #django.db.models.Prefetch</p>
↗
https://docs.djangoproject.com/en/1.11/ref/models/querysets/
Filipe Ximenes
Apr 26, 2017
Topics:
django, orm
<p>A Few Django ORM Mistakes </p>
↗
http://kevinmahoney.co.uk/articles/django-orm-mistakes/
Filipe Ximenes
Mar 28, 2017
Topics:
django, orm
Close Cookie Preference Manager
Cookie Settings
By clicking “Accept all”, you agree to the storing of cookies on your device to enhance site navigation, analyze site usage and assist in our marketing efforts.
Check our privacy policies.
Strictly Necessary (Always Active)
Cookies required to enable basic website functionality.
Analytics
Cookies helping understand how this website performs, how visitors interact with the site, and whether there may be technical issues.
Marketing
Cookies used to deliver advertising that is more relevant to you and your interests.
Personalization
Cookies allowing the website to remember choices you make (such as your user name, language, or the region you are in).
Save settings
Accept all
We use Cookies to promote our services.
Settings and Privacy.
Accept