Help interpreting output of indextrace

Post Reply
barry.marcus
Posts: 288
Joined: Thu Nov 16, 2006 1:05 pm

Help interpreting output of indextrace

Post by barry.marcus »

I am trying to ascertain if a certain query that our code is calling is using a metamorph inverted index and, if not, why. I've surrounded the call to <sql "$myQuery"></sql> with the statements:

<sql novars "set indextrace=1"></sql>
and
<sql novars "set indextrace=0"></sql>

What I see in the log are these entries for each query call:

100 2013-02-05 14:00:38 /crosshairs:7460: Cannot mmap() Metamorph index token file D:\Crosshairs\database1\vt_511164e528_MI.tok: EPI_HAVE_MMAP not defined; using file I/O in the function openfdbi

and

200 2013-02-05 14:00:38 /crosshairs:7460: Cannot mmap() Metamorph index data file D:\Crosshairs\database1\vt_511164e528_MI.dat: EPI_HAVE_MMAP not defined; using file I/O in the function openfdbi

Not sure what this means. Is this saying that texis is NOT using the index? If so, my next step is to figure out why not? But I'm unsure of the meaning of these two log entries.

Thanks for your help.
User avatar
Kai
Site Admin
Posts: 1271
Joined: Tue Apr 25, 2000 1:27 pm

Help interpreting output of indextrace

Post by Kai »

The messages indirectly indicate the Metamorph index *is* being used. This particular "Cannot mmap()" message is issued for Windows because mmap() is not used; Texis is using file I/O instead (which indicates it is using the index).

Another way to find out if a LIKE/LIKEP/etc. query is using a Metamorph index is by setting allinear=0: if you get a `Query would require linear search' message then an index *cannot* be used. Note also that only LIKE-type queries ever use Metamorph indexes, so if there is no LIKE-type operator, it will not use a Metamorph index (but also not issue `Query would require linear search').

You can also set alpostproc=0 to see if the index is not only being used, but can fully resolve the query, without a post-process linear search: `Query would require post-process' indicates an index was used, but some additional linear processing was still needed on the results (though less than a full linear search).
barry.marcus
Posts: 288
Joined: Thu Nov 16, 2006 1:05 pm

Help interpreting output of indextrace

Post by barry.marcus »

Thanks.
Post Reply