Depending on the data you might be able to separate the client request from database queries. A separate script can query the database every few minutes or seconds and save the results to a file (or shared memory). Your CGI script reads that file instead of the database. Then no matter how many requests you get the number of database queries remains constant.
Try changing this sequence of events:
request -> database query -> response
Into something like this:
daemon -> database query -> cached
request -> cached value -> response