I'm in work on a Saturday, doing some database munging. We have a large update that requires dropping a bunch of rows, and a schema change. I wish we had a DBA on staff for times like this. Or maybe a kick-ass local consultant whom we could bring in from time to time. The row … Continue reading When you know enough SQL to get by
Tag: Postgres
Django vs. PostgreSQL IN operations
Here's another cautionary performance tale, wherein I thought I was clever but was not. A table ("Vital") holds widget information. Another table ("Furball") holds other information, with an M:M relationship to Vital. We want to do inferential computations on filtered Furball rows. So we generate a pk list from a Vital QuerySet, and call this … Continue reading Django vs. PostgreSQL IN operations
Celery uses spin-loops. Gah!
Here's another cautionary performance tale. If you use Celery subtasks to manage parallel work, know going in that it uses spin-loops to monitor subtask progress. Specifically, if you get a TaskSetResult from a TaskSet and then use iterate() or join(), the underlying code will eat your CPU alive. Here's the code in celery.result.TaskSetResult: The symptom … Continue reading Celery uses spin-loops. Gah!
A performance lesson on Django QuerySets
At work, we've contracted with PostgreSQL Experts to help us improve our Postgres performance. After analyzing our system, one of their consultants, Christophe Pettus, found glaring problems in how some of my code accessed our database. I consider myself well-informed about good database access practices in Django, and in general. I might not exactly hit … Continue reading A performance lesson on Django QuerySets
Postgres site will migrate to Django
One interesting tidbit from last night's PostgreSQL BOF session was the news that Postgres' site would be migrated to Django within the next year. This came from Josh Berkus. Postgres' site now is apparently generated from a bespoke PHP script mishmash. Josh said that tasks like creating new forms was much harder than they ought to … Continue reading Postgres site will migrate to Django
Liveblog: Open Source Bridge, day 2
19:00: Checking the PostgreSQL BOF session. Oh, Selena's here, that's a +1. News and tidbits about Postgres 9... I made a lame joke about Postgres running on Android, and the response was a serious, "I don't think so, not yet." (The times, they are a-changin'.) Postgres' site will be migrated to Django. Hot-standby replication and … Continue reading Liveblog: Open Source Bridge, day 2