|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object felix.optimizer.CostModel
public class CostModel
An object of the cost model used by the optimizer. This class works as a bridge from PostgreSQL's optimizer to Felix's optimizer.
Nested Class Summary | |
---|---|
class |
CostModel.resultTuple
Class for a set of different costs. |
Field Summary | |
---|---|
double |
memoryTradeOff
|
double |
postgreUnit
The ratio of postgreSQL's unit cost to page IO cost. |
Constructor Summary | |
---|---|
CostModel(Felix _felix)
The constructor of CostModel. |
Method Summary | |
---|---|
void |
close()
Close the database connection used by CostModel. |
double |
getCost(java.lang.String sql)
Return the cost of the given sql query. |
double |
getFullMatCost(tuffy.ra.ConjunctiveQuery q,
double numberOfBB,
double numberOfBF,
double numberOfFF,
java.util.HashSet<java.lang.String> whichToBound)
Return the cost of Fully-Materialization plan for q. |
double |
getFullViewCost(tuffy.ra.ConjunctiveQuery q,
double numberOfBB,
double numberOfBF,
double numberOfFF,
java.util.HashSet<java.lang.String> whichToBound)
Return the cost of Fully-View plan for q. |
CostModel.resultTuple |
getJoinCostBetweenTwoMaterializedTable(tuffy.mln.Literal head,
tuffy.ra.ConjunctiveQuery q1,
tuffy.ra.ConjunctiveQuery q2,
double numberOfBB,
double numberOfBF,
double numberOfFF,
java.util.HashSet<java.lang.String> whichToBound)
Return the cost of Hybrid-Materialization plan for query {head :- q1.head, q2.head}. |
CostModel.resultTuple |
getNewEmptyResultTuple()
Return a new CostModel.resultTuple . |
void |
getPostgreUnit()
Estimate postgreUnit . |
double |
getRows(java.lang.String sql)
Return the number of rows returned by the given sql query. |
double |
getTableSize(java.lang.String tableName)
Return the number of rows of the given table. |
double |
getTableWidth(java.lang.String tableName)
Return the width (in bits) of the given table. |
double |
getWidth(java.lang.String sql)
Return the width (in bits) returned by the given sql query. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public double postgreUnit
public double memoryTradeOff
Constructor Detail |
---|
public CostModel(Felix _felix)
_felix
- Method Detail |
---|
public double getTableSize(java.lang.String tableName)
tableName
-
public double getTableWidth(java.lang.String tableName)
tableName
-
public CostModel.resultTuple getNewEmptyResultTuple()
CostModel.resultTuple
.
public double getCost(java.lang.String sql)
sql
-
public double getRows(java.lang.String sql)
sql
-
public double getWidth(java.lang.String sql)
sql
-
public void getPostgreUnit()
postgreUnit
.
public void close()
public double getFullMatCost(tuffy.ra.ConjunctiveQuery q, double numberOfBB, double numberOfBF, double numberOfFF, java.util.HashSet<java.lang.String> whichToBound)
q
- numberOfBB
- numberOfBF
- numberOfFF
- whichToBound
-
public double getFullViewCost(tuffy.ra.ConjunctiveQuery q, double numberOfBB, double numberOfBF, double numberOfFF, java.util.HashSet<java.lang.String> whichToBound)
q
- numberOfBB
- numberOfBF
- numberOfFF
- whichToBound
-
public CostModel.resultTuple getJoinCostBetweenTwoMaterializedTable(tuffy.mln.Literal head, tuffy.ra.ConjunctiveQuery q1, tuffy.ra.ConjunctiveQuery q2, double numberOfBB, double numberOfBF, double numberOfFF, java.util.HashSet<java.lang.String> whichToBound)
q
- numberOfBB
- numberOfBF
- numberOfFF
- whichToBound
-
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |