| Modifier and Type | Field and Description |
|---|---|
| private final AllColumnsForPlan | |
| private Plan | |
| private final Expression | |
| private double | |
| private final TableFilter[] | |
| private static final int | |
| private static final int | |
| private static final int | |
| private Random | |
| private final SessionLocal | |
| private long | |
| private BitSet | |
| private TableFilter |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| private void | |
| private void | |
| private void | |
| private void | |
| private void | |
| private boolean | |
| pack-priv double | |
| private static int | Returns: the number of filters to calculate using brute forcethe number of filters total filterCount)How many filter to calculate using brute force. |
| public TableFilter | |
| pack-priv void | optimize(boolean
If we do not need to really get the best plan because it is
a view parsing stage. parse)Calculate the best query plan to use. |
| private void | |
| private boolean | |
| private boolean |
| allColumnsSet | back to summary |
|---|---|
| private final AllColumnsForPlan allColumnsSet | |
| bestPlan | back to summary |
|---|---|
| private Plan bestPlan | |
| condition | back to summary |
|---|---|
| private final Expression condition | |
| cost | back to summary |
|---|---|
| private double cost | |
| filters | back to summary |
|---|---|
| private final TableFilter[] filters | |
| MAX_BRUTE_FORCE | back to summary |
|---|---|
| private static final int MAX_BRUTE_FORCE | |
| MAX_BRUTE_FORCE_FILTERS | back to summary |
|---|---|
| private static final int MAX_BRUTE_FORCE_FILTERS | |
| MAX_GENETIC | back to summary |
|---|---|
| private static final int MAX_GENETIC | |
| random | back to summary |
|---|---|
| private Random random | |
| session | back to summary |
|---|---|
| private final SessionLocal session | |
| startNs | back to summary |
|---|---|
| private long startNs | |
| switched | back to summary |
|---|---|
| private BitSet switched | |
| topFilter | back to summary |
|---|---|
| private TableFilter topFilter | |
| Optimizer | back to summary |
|---|---|
| pack-priv Optimizer(TableFilter[] filters, Expression condition, SessionLocal session) | |
| calculateBestPlan | back to summary |
|---|---|
| private void calculateBestPlan() | |
| calculateBruteForceAll | back to summary |
|---|---|
| private void calculateBruteForceAll() | |
| calculateBruteForceSome | back to summary |
|---|---|
| private void calculateBruteForceSome() | |
| calculateFakePlan | back to summary |
|---|---|
| private void calculateFakePlan() | |
| calculateGenetic | back to summary |
|---|---|
| private void calculateGenetic() | |
| canStop | back to summary |
|---|---|
| private boolean canStop(int x) | |
| getCost | back to summary |
|---|---|
| pack-priv double getCost() | |
| getMaxBruteForceFilters | back to summary |
|---|---|
| private static int getMaxBruteForceFilters(int filterCount) How many filter to calculate using brute force. The remaining filters are selected using a greedy algorithm which has a runtime of (1 + 2 + ... + n) = (n * (n-1) / 2) for n filters. The brute force algorithm has a runtime of n * (n-1) * ... * (n-m) when calculating m brute force of n total. The combined runtime is (brute force) * (greedy).
| |
| getTopFilter | back to summary |
|---|---|
| public TableFilter getTopFilter() | |
| optimize | back to summary |
|---|---|
| pack-priv void optimize(boolean parse) Calculate the best query plan to use.
| |
| shuffleAll | back to summary |
|---|---|
| private void shuffleAll(TableFilter[] f) | |
| shuffleTwo | back to summary |
|---|---|
| private boolean shuffleTwo(TableFilter[] f) | |
| testPlan | back to summary |
|---|---|
| private boolean testPlan(TableFilter[] list) | |