About 17 results
https://rednafi.com/python/switch-between-multiple-datastreams/ · 19 Feb 2023
Poll multiple data sources in a single thread using Python generators with itertools.cycle to alternate between infinite data streams efficiently.
https://rednafi.com/python/manipulate-text-with-django-query-expression/ · 7 Jan 2023
Use Django query expressions like Replace, Upper, Lower, Concat, and Substr for efficient database-level text manipulation without fetching data.
https://rednafi.com/python/faster-bulk-update-in-django/ · 30 Nov 2022
Accelerate Django bulk_update operations by 4x using multiprocessing to parallelize database writes across chunked record batches.
https://rednafi.com/python/recipes-from-python-sqlite-docs/ · 11 Sep 2022
Practical SQLite recipes for Python: execute statements, batch operations, transactions, row factories, and context managers with sqlite3.
https://rednafi.com/system/random-choice-in-sqlite/ · 2 Sep 2022
Emulate Python's random.choice in SQLite using JSON arrays and the random() function. Populate tables with realistic test data efficiently.
https://rednafi.com/python/django-bulk-operation-with-process-pool/ · 27 Jun 2022
Speed up Django bulk operations with ProcessPoolExecutor while preserving signals and hooks that bulk_create/bulk_update bypass.
https://rants.broonix.ca/renaming-database-constraints-with-liquibase · 13 Sep 2016
We used hibernate to set up our initial database schema. Hibernate generates constraint names like: fk_jwy3ip299dvht6bhrf7kxnmap and fk_bc7w4arbgsiasoufirt1ec0na. While these are unique and of a length that works on all databases, they are not very descrip...