Please provide an example of the queries you're currently using, and your table definitions, in your post. As it stands now, your question isn't very clear, especially on how loops are even relevant here.
That being said, with the current information you provided, it sounds like you guys could possibly benefit from dynamic SQL by leveraging the system stored ...
After seeing Michael Green's answer, which is full of great points, I wanted to provide some additional thoughts to weigh against his points. I'm not trying to win the argument for the side of using stored procs, per se, but I do believe they are often misunderstood and/or misrepresented in these kinds of conversations.
A) Scale - SQL statements have to be ...
VIEWs are syntactic sugar, not a way to speed up anything.
This will create a new table from a select:
CREATE TABLE foo
This creates a TEMPORARY table that will go away when you disconnect:
CREATE TEMPORARY TABLE foo
To rebuild the table daily, this will repopulate it:
TRUNCATE TABLE foo;
INSERT INTO foo