> The code is quite ugly with a lot of catch throw statements due to the fact
> that I want things to terminate right away if the query fails.
I haven't investigated it too deeply yet, but perhaps these catch/throw
constructs can be avoided: 'for' can be terminated at any time using the
'T' or 'NIL' clauses (same as in 'loop' and 'do').
Also, I'm not sure if looping over the data with 'for' is necessary at
all. Direcly using functions with "built-in looping", like 'member' and
'find', and also 'match', is probably faster. The whole issue looks to
me as a typical application of nested 'match' calls (i.e. matching on
partial expressions bound to pattern variables by previous matches).
Just 2 cent at the moment ;-)