Not to be pedantic, but but if the stored compilation were
discarded wouldn't that decompile the query?
Effectively. And, to be fair, that's how /decompile decompiles VBA
-- it just discards the p-code and keeps the canonical code.
Again, though, there is a commandline switch called "decompile" that
decompiles VBA code. That's all it does -- a 1:1 relationship
between operation and result.
You can't issue a command that decompiles your saved queries.
Indeed, you can't even tell if your query is compiled or not, and
without walking the QueryDefs collection, you can't tell anything
about the compiled SQL for form recordsources and combo/list box
recordsources. I guess you could decompile the latter by deleting
all the "~sq_" QueryDefs, but that wouldn't decompile everything.
And the space wouldn't be recovered until a compact.
Now, the space isn't recovered from a decompile until the compact,
but the point is it's the *compact* that recovers the space. In the
case of VBA bloat, you have to decompile to get maximum benefit. In
the case of compiled SQL, you just have to compact.
Compilation is so fast, that I'll agree, the extra second at most
is negligible. But I disagree that recompilation doesn't
measurable improve query performance. Most queries won't benefit
very much, but the difference in performance in queries that use
large tables, particularly tables that deal with thousands of
deletes and appends can be improved by 10 to 20%.
In my professional Access development (starting in 1996) I've never
seen a performance problem that would have benefited from regular
compacting of the front end.