Not sure, gallery uses the main vbulletin database. Some that do not need immediate display, use slave server but that is vbulletin stuff. But there are some optimization threads at vbulletin.com that explain how to optimize the settings of mysql and apache.
do some reading...
for slave server SlaveServer directive not working
and i remember seeing the threads on how to optimize mysql and apache, but just checked and cant find them anymore.