Maybe I’m missing something but I would imagine query planning and caching is the hardest thing in terms of database memory usage. This post doesn’t seem to address that.
Even if the messages are fixed sized surely the memory cost of executing the queries depends on the complexity of the query, and the expected numbers of results returned.
Are they just doing get/set style queries only?