Just to mention that we have been using moodle with database sessions for several years, with no issues. We have approximately 30000 students in Moodle each year. We use to have exams with hundreds of students simultaneously. We also had a national program with thousands of students with simultaneous due dates. We've never had this kind of issues.
We changed sessions to filesystem as recommended, but...
... we found that the query "select * from mdl_sessions" (with no conditions) came from a contributed plugin, installed for the first time this academic year. So, apparently it was not a core moodle problem.