Fortunately, no, this SQL is not executed at runtime. It is used only
when the indices are built.
The DeepSee data model (created in the Architect) describes how to
build a fact table, which is a highly denormalized table with a high-
speed lookup mechanism (the indices). Each row of your base class gets
represented by a row in the fact table, and that row has all the
dimension and measure information for that base-class item.
Then at runtime (running the pivot table, I mean), DeepSee uses that
fact table. So instead of performing a complex query against the
database via SQL, possibly hitting multiple tables, we use a simple
query that selects rows from the fact table and uses them (in a manner
still slightly mysterious to me).
The fact table is central to DeepSee. In the Architect, you are
telling DeepSee what information to put into the fact table. Some of
that info. is simply copied from your normalized tables, but some of
it is computed (using any expression you can write in COS!). And that
computation occurs when the indices are built.