Class SparqlOptimiser
Helper class which provides a registry of Algebra Optimisers and the global Query Optimiser.
Inherited Members
Namespace: VDS.RDF.Query.Optimisation
Assembly: dotNetRdf.dll
Syntax
public class SparqlOptimiser
Fields
| Edit this page View SourceDefault
Get a default pre-configured optimiser.
Declaration
public static readonly SparqlOptimiser Default
Field Value
Type | Description |
---|---|
SparqlOptimiser |
OptimiserStatsNamespace
Namespace URI for the Optimiser Statistics vocabulary.
Declaration
public const string OptimiserStatsNamespace = "http://www.dotnetrdf.org/optimiserStats#"
Field Value
Type | Description |
---|---|
string |
Properties
| Edit this page View SourceAlgebraOptimisers
Gets the global Algebra Optimisers that are in use.
Declaration
public IEnumerable<IAlgebraOptimiser> AlgebraOptimisers { get; }
Property Value
Type | Description |
---|---|
IEnumerable<IAlgebraOptimiser> |
Remarks
Unlike Query Optimisation multiple Algebra Optimisations may apply. Algebra optimisers may also be specified and apply locally by the use of the relevant properties on the SparqlQueryParser and SparqlQuery classes. Those specified on a parser will automatically be passed through to all queries parsed by the parser. Locally specified optimisers apply prior to globally specified ones.
QueryOptimiser
Gets/Sets the global Query Optimiser that is used by default.
Declaration
public IQueryOptimiser QueryOptimiser { get; set; }
Property Value
Type | Description |
---|---|
IQueryOptimiser |
Remarks
Note: May be overridden by the Optimiser setting on a SparqlQueryParser.
Unlike previous releases a Query may be reoptimised using a different optimiser if desired by calling the Optimise() method again and providing a different Optimiser. This may not always fully reoptimise the query since the first optimisation will have caused any Filters and Assignments to be placed in the Triple Pattern.
Warning: Setting this to null has no effect, to disable automatic optimisation use the QueryOptimisation property for query parsing or QueryOptimisation property for SPARQL update parsing. Even with this option disabled a Query can still be optimised manually by calling its Optimise() method.
Methods
| Edit this page View SourceAddOptimiser(IAlgebraOptimiser)
Adds a new Algebra Optimiser.
Declaration
public void AddOptimiser(IAlgebraOptimiser optimiser)
Parameters
Type | Name | Description |
---|---|---|
IAlgebraOptimiser | optimiser | Optimiser. |
RemoveOptimiser(IAlgebraOptimiser)
Removes an Algebra Optimiser.
Declaration
public void RemoveOptimiser(IAlgebraOptimiser optimiser)
Parameters
Type | Name | Description |
---|---|---|
IAlgebraOptimiser | optimiser |
ResetOptimisers()
Resets Optimisers to default settings.
Declaration
public void ResetOptimisers()