TireSwingSoftware/openassign-server — Issue #41: Reduce database hits
Author: mhrivnak
Created: 2011-11-10 22:45:40+00:00
State: open
Labels: performance

We can do at least two easy things to vastly reduce the number of database queries per HttpRequest:

* cache AuthToken objects
* access user foreign key as "user_id" instead of "user.id" on other objects, which prevents the entire user objects from being loaded.

Currently, an average get_filtered RPC by an admin requires 7 SQL statements. I think we can reduce that quite a bit.

Reduced database traffic will be very valuable if the system ever becomes congested, and these two strategies are low-hanging-fruit.