Click or drag to resize

OrderByDistinctOptimiser Class

An optimizer that handles a special case for ORDER BY + DISTINCT combinations which can significantly improve performance by eliminating duplicates prior to sorting when the default SPARQL behaviour is to do a potentially costly sort over many duplicates and then eliminate distincts.
Inheritance Hierarchy

Namespace:  VDS.RDF.Query.Optimisation
Assembly:  dotNetRDF (in dotNetRDF.dll) Version:
public class OrderByDistinctOptimiser : IAlgebraOptimiser

The OrderByDistinctOptimiser type exposes the following members.

Public methodOrderByDistinctOptimiser
Initializes a new instance of the OrderByDistinctOptimiser class
Public methodEquals
Determines whether the specified object is equal to the current object.
(Inherited from Object.)
Protected methodFinalize
Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from Object.)
Public methodGetHashCode
Serves as the default hash function.
(Inherited from Object.)
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Public methodIsApplicable(SparqlQuery)
Returns true if the query is a SELECT DISTINCT or SELECT REDUCED and has an ORDER BY.
Public methodIsApplicable(SparqlUpdateCommandSet)
Returns that this is not applicable to updates.
Protected methodMemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Public methodOptimise
Optimizes the given algebra.
Public methodToString
Returns a string that represents the current object.
(Inherited from Object.)
Only applies to queries which meet the following criteria:.
  • Has an ORDER BY and a DISTNCT on the same level of the query
  • Selects a fixed list of variables i.e. not a SELECT DISTINCT *
  • All variables used in the ORDER BY expressions also occur in the project list
See Also