I have 5000 databases on one server.
Switching databases is taking a long time sometimes 2 seconds. (use databaseA)
IT is showing up in a my slow queries log. Is there any way to make this go faster.. some form indexing or some other configuration?
Short of beefing up your server hardware, you could start splitting off databases to several servers, as 5000 databases on a single server is pretty huge.
Something that will cut your I/O wait, which is most likely an issue is an SSD, but a good one costs hundreds of $.