3 ms·
> - Shifting more work away from Python to the database. A surprising number of apps don't do pagination properly. This is very true. Get as much out of databa
by yeukhon 12y ago
> - Shifting more work away from Python to the database. A surprising number of apps don't do pagination properly.
This is very true. Get as much out of database before doing in python. Creation of objects such as new list is very expensive in Python, especially when you are dealing with large amount of data.Iterating over data just to do some aggregation that can be done in DB is slow and expensive. Cache the result later if you expect that to be useful.