If debug output is on and the first time raise its the websever. If the second time time raise its the database server or the way how threads do a query. In first case you can only contact the hoster. In 99% you cant do anything. If the second time raised you have to look in two things:
1) Is this a issue on userbase or for all user. If this happen only to sime user go to this user ad see how much unread postings he have. Use mark all read and try again. If this resolve your problem go to the board setup and reduce the settings in this case (post tracking).
2) if all user have problems check the database server. Try a query by hand and see how it work. If the same problems comes up contact your DB Admin to do some performance tuning or change the database server.