Yes, combine your queries into one query. Use regex for the table name to combine those queries together.
An example: