Well, most of those queries are just to look up the "name" for a given ID. And of course we use memcached to cache almost everything. But it still requires a bunch of round trip requests to either the database or memcached.
Before anyone asks "why don't you just use a join?" it's because we have tons of different types of data stored in a couple of summary tables. It's 100x faster to just grab all the IDs and values, and then grab the names one at a time (most of which will always be in memcached) than to do it as a join. Don't believe me? We used to do it that way and the performance sucked.
Before anyone asks "why don't you just use a join?" it's because we have tons of different types of data stored in a couple of summary tables. It's 100x faster to just grab all the IDs and values, and then grab the names one at a time (most of which will always be in memcached) than to do it as a join. Don't believe me? We used to do it that way and the performance sucked.