def get_tables(self, farm):
        tables = self.farms.get(farm, {}).get('tables')
        if tables:
            return tables

        dbcnf = self.get_sqlstore_dbcnf('%s_m' % farm)
        farm = SqlFarm(dbcnf, connect_timeout=1)
        cursor = farm.get_cursor()
        cursor.execute('show tables')
        tables = [r[0] for r in cursor.fetchall()]
        return tables