[tmql-wg] aliases

Robert Barta rho@bigpond.net.au
Sat, 28 Feb 2004 18:38:31 +1000


On Thu, Feb 26, 2004 at 10:46:33AM +0100, Rani Pinchuk wrote:
> 2. It seems to me that in many applications it is necessary to find a
> topic only by its name (for example question/answering systems), and if
> so, the alias command can become quite popular. 

No doubt on this. In fact "addressing a topic with its name" will
be one of the most query patterns.

> On the other hand, macros/functions/inference rules usually suffer in
> performance compared to a built in feature (especially here, if you take
> into account the recursive nature of the variant). 

OK, as Lars already said, that the variant (I desparately hope that
this 'unfeature' will go away at some stage and will be replaced by
typed basenames :-) is flattened out.

But:

First, what an 'alias' could be might be clear in your particular
application, maybe it is something different in mine. So, defining a
function or a inference rule is indispensible.

Secondly, yes, this might be combined with a performance penalty
relative to a hardwired solution (everything has a penalty relative
to a hardwired solution), but that can be kept small.

In my current AsTMa? implementation, the query engine keeps track
in the atomic access patterns which queries do agains a map. I have
not spent much benchmarking, but according to these statistics the
low-level database engine can defer that it would pay off to create
an index for particular access patterns.

And then, there would not be much difference between the hardwired and
the flexible solution. Again, this is more conjecture, then proof.

\rho

PS: Can we all use the same mail quoting discipline, please? It is
    very difficult to follow threads when text is just fired off
    somewhere at the start of an email.