com.bigdata.rdf.sparql.ast.QueryOptimizerEnum Maven / Gradle / Ivy
/**
Copyright (C) SYSTAP, LLC DBA Blazegraph 2006-2016. All rights reserved.
Contact:
SYSTAP, LLC DBA Blazegraph
2501 Calvert ST NW #106
Washington, DC 20008
[email protected]
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
/*
* Created on Jan 2, 2011
*/
package com.bigdata.rdf.sparql.ast;
/**
* The known query optimizers.
*
* @see QueryHints#OPTIMIZER
*
* @author Bryan Thompson
* @version $Id$
*/
public enum QueryOptimizerEnum {
/**
* The query optimizer is disabled. The joins in the query will be evaluated
* in the order in which they are given. This may be used to compensate when
* the static query optimizer produces an inefficient join ordering.
*/
None,
/**
* A query optimizer based on a static analysis of the query which relies on
* fast range counts for the basic graph patterns to estimate the
* cardinality of the different access paths. This optimizer is fast but it
* can fail to order joins correctly as the error in the estimated
* cardinality of joins can grow exponentially in the number of joins in the
* query.
*/
Static,
/**
* A runtime query optimizer based on sampling. The runtime query optimizer
* samples each of the access paths and each of the joins and builds out
* join paths in a breadth first manner until it finds a join ordering which
* is known to dominate the other possible join orderings. The runtime query
* optimizer takes into account the actual cardinality and correlation in
* the query and the data selected by that query. The runtime query
* optimizer can have slightly more overhead than the static query
* optimizer, but it never produces a bad join ordering and often identifies
* the best join ordering. For cases where the static
* query optimizer produces a bad join ordering, the runtime query optimizer
* can find join orderings which are orders of magnitude more efficient (10x
* or 100x). For long running joins, this can translates into a savings of
* minutes or hours.
*/
Runtime;
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy