42 | | 6. Python runs very fast as opposed to DB queries, so it can be much faster to retrieve 100 rows in one query and then drop 95 of them in the Python code, than to retrieve 5 rows in 5 queries (=do not loop over queries, better loop over the results). |
43 | | |
44 | | 7. Consider having configurations which are read from DB frequently but written-to rarely, be set in configuration files which are written-out from the DB (like the CSS from themes) |
45 | | |
| 42 | 6. Consider having configurations which are read from DB frequently but written-to rarely, be set in configuration files which are written-out from the DB (like the CSS from themes) |
| 43 | |
| 44 | 7. Mind your field representations! Sometimes they execute complex DB queries, which behave fine with just a few test records, but become a nightmare with 10000 records. To be sure - test loading a form/list view with 10000 records in the table. |