Previous topic  Top  Next topic  Print this Topic
 

Tracing the Evaluation Process

 

OntoBroker has some useful features which help to analyze performance and to trace the evaluation process.

###########################################################

# Trace (only has Effect when using 'trace' Query Option)

# NOTE: For Statistics about Query Execution

#       use the 'profile' Query Option.

###########################################################

#Trace.Evaluation = off

#Trace.Evaluation = simple

#Trace.Evaluation = rules

#Trace.Evaluation = full

#Trace.Rewriter   = on

#Trace.Rules      = off

#Trace.Queries    = on

#Trace.Datamodel.Changes    = on

#Trace.Datamodel.Requests   = on

#Trace.Materialization = on

This is an expert feature which gives extensive log information:

Display of selected rules
Behavior of individual rewriters
Flow of tuples through the operatornet
Shows the logged requests on datamodel (via Java-API)

The following OntoConfig options allow external database access to be traced:

#Trace.ExternalDatabase     = off

#Trace.ExternalDatabase.SQL = off

When these options are set then OntoBroker will show

Information about the database schema
Information about SQL database requests (SQL query, number of results)

Example

@{q1, options[trace]} ?- ?X::Company.

The rules listed in the output are all rules which are relevant for the evaluation (this is in most cases a subset of the total rules). During the evaluation statistics are gathered which help give an impression of the evaluation characteristics of rules.  Often the cause for the poor evaluation time of a rule lies in some built-in or connector (especially database connectors can take up a lot of time).

If you are interested in how OntoBroker actually evaluates the rules, you can turn on full tracing "Trace.Evaluation=full". Then you will see the flow of tuples through the operatornet. Note that the output is very hard to read and interpret. The primary use case of this feature is that you can send the OntoBroker output for a specific query to the ontoprise support team, to, for example, help reproduce a bug or explain an unexpected result.