Sphinx search is an alternate method to query database content. It's goal is to be fast and light weight.
# emerge app-misc/sphinx
Copy the well commented configuration file into production location:
# cp /etc/sphinx/sphinx.conf.dist /etc/sphinx/sphinx.conf
Set the database credentials to query:
sql_host = localhost sql_user = test sql_pass = sql_db = test sql_port = 3306 # optional, default is 3306
To enable service, and start immediately:
# rc-update add searchd default && rc