 <p>Your are asking the wrong question, so any answer we will give is also going to be wrong. </p> <p>You are asking how to more effectively use the tool you have (SQL Server) to solve an unspecified problem.</p> <p>The "job to be done" may be more easily solved with some other tool or a completely different design.</p> <p>If you really-really need to use a Cartesian product of this volume, you should look at using <a href="http://en.wikipedia.org/wiki/Lazy_evaluation" rel="nofollow">Lazy Evaluation</a> or the call-by-need design pattern. How you do this depends on the client language involved. </p> <p>You MAY be able to create a T-SQL lazy-evaluation with a procedure and a few sequences, but that is just a hunch.</p>