I was feeling a little bummed out today about Vienna's sluggishness, so I added an index to the messages.db SQLite database:
CREATE INDEX messages_text_idx on messages (text);
This sped up the message loading dramatically at the cost of doubling the size of the database file. I consider this a big win. (I haven't done any actual profiling to make sure that the SQL queries were the bottleneck, but it certainly felt like it)
Perhaps it might be nice to add a 'go-faster' option to the preferences that adds indexes to all the columns in the messages table when checked. This would come with a clear warning about the resulting size increase of the database file, of course.