Class BaseQueryOptimiser
A basic abstract implementation of a Query Optimiser.
Implements
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: VDS.RDF.Query.Optimisation
Assembly: dotNetRDF.dll
Syntax
public abstract class BaseQueryOptimiser : IQueryOptimiser
Remarks
Derived implementations may use override the virtual properties to control what forms of optimisation are used. Derived implementations must override the GetRankingComparer() method, optimisers which do not wish to change the order of Triple Patterns should return the NoReorderComparer in their implementation as a basic sort of Triple Patterns is done even if ShouldReorder is overridden to return false.
Properties
| Improve this Doc View SourceShouldPlaceAssignments
Controls whether the Optimiser will place Assignments.
Declaration
protected virtual bool ShouldPlaceAssignments { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
Remarks
It is recommended that derived classes do not change this setting as this may hurt performance. If you want to control the optimisation process in detail we suggest you implement IQueryOptimiser directly in your own class and not derive from this implementation.
|
Improve this Doc
View Source
ShouldPlaceFilters
Controls whether the Optimiser will place Filters.
Declaration
protected virtual bool ShouldPlaceFilters { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
Remarks
It is recommended that derived classes do not change this setting as this may hurt performance. If you want to control the optimisation process in detail we suggest you implement IQueryOptimiser directly in your own class and not derive from this implementation.
|
Improve this Doc
View Source
ShouldReorder
Controls whether the Optimiser will attempt to reorder Triple Patterns.
Declaration
protected virtual bool ShouldReorder { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
Remarks
It is recommended that derived classes do not change this setting as this may hurt performance. If you want to control the optimisation process in detail we suggest you implement IQueryOptimiser directly in your own class and not derive from this implementation.
|
Improve this Doc
View Source
ShouldSplitFilters
Controls whether the Optimiser will split Filters.
Declaration
protected virtual bool ShouldSplitFilters { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
Remarks
If a Filter contains an and expression it may be split into its constituent parts and applied separately. This option only applies if filter placement also applies.
Defaults to false since it is unclear if this actually benefits performance.
Methods
| Improve this Doc View SourceGetRankingComparer()
Gets a comparer on Triple Patterns that is used to rank Triple Patterns.
Declaration
protected abstract IComparer<ITriplePattern> GetRankingComparer()
Returns
Type | Description |
---|---|
System.Collections.Generic.IComparer<ITriplePattern> |
Remarks
By overriding this in derived classes you can change how the Optimiser weights different patterns and thus the resultant ordering of Triple Patterns.
|
Improve this Doc
View Source
Optimise(GraphPattern, IEnumerable<String>)
Causes the Graph Pattern to be optimised if it isn't already.
Declaration
public void Optimise(GraphPattern gp, IEnumerable<string> variables)
Parameters
Type | Name | Description |
---|---|---|
GraphPattern | gp | Graph Pattern. |
System.Collections.Generic.IEnumerable<System.String> | variables | Variables that have occurred prior to this Pattern. |