On Sat, Feb 19, 2005 at 13:30:49 -0000,
Richard Crawley <richard.crawley@quadronservices.co.uk> wrote:
>
> I suppose what I'm doing is building some quite large, complicated views.
> Now, thus far I haven't had much choice, and the temp tables do help
> debugging. But this approach doesn't allow the dbase any optimising and
> these long chains of queries are quite fragile.
>
> My question is whether there are better ways of doing it. I could probably
> (hopefully) convert it into one mega query, which would allow the dbase the
> opportunity to optimise. My worry is that it would be a dense tangle of
> things and hence difficult to maintain/explain.
Using the views modularly should help keep things maintainable and allow
for optimization. Roughly there would be a view corresponding to each
temporary table in your previous way of doing things.