One of the sites I was recently profiling showed up to 300ms to retrieve data from the notifications table. Adding an index over the uid and type columns dropped this to an average of 0.2ms.

It's an easy performance win, here's a patch to the install file allowing the index to be added.

CommentFileSizeAuthor
notifications-uidtypecolumnindex.patch579 bytesjohan.gant