This class represents the cost of a hash join (excluding the cost of sub-paths).
More...
#include <cost_model.h>
This class represents the cost of a hash join (excluding the cost of sub-paths).
◆ HashJoinCost()
| HashJoinCost::HashJoinCost |
( |
THD * |
thd, |
|
|
const HashJoinMetrics & |
metrics, |
|
|
bool |
allow_spill_to_disk = true |
|
) |
| |
◆ cost()
| double HashJoinCost::cost |
( |
| ) |
const |
|
inline |
◆ init_cost()
| double HashJoinCost::init_cost |
( |
| ) |
const |
|
inline |
◆ overflow_probability()
| double HashJoinCost::overflow_probability |
( |
| ) |
const |
|
inline |
Estimated probability that the build input overflows one join buffer.
Unlike spill_to_disk_probability(), this is independent of allow_spill_to_disk: a no-spill plan with overflow_probability()>0 will refill the hash table rather than write chunk files, but the in-memory buffer is still not reusable across re-Init() in that case.
◆ probe_iterations()
| double HashJoinCost::probe_iterations |
( |
| ) |
const |
|
inline |
The number of times the probe input must be scanned.
Greater than 1 when the build input does not fit in the join buffer and we need multiple passes (with hash table refills).
◆ spill_to_disk_probability()
| double HashJoinCost::spill_to_disk_probability |
( |
| ) |
const |
|
inline |
◆ m_cost
| double HashJoinCost::m_cost |
|
private |
The cost of the hash join.
◆ m_init_cost
| double HashJoinCost::m_init_cost |
|
private |
The cost of preparing to produce the first result row.
◆ m_overflow_probability
| double HashJoinCost::m_overflow_probability {0.0} |
|
private |
The probability (range [0.0, 1.0]) that the build input overflows one join buffer, regardless of whether spill-to-disk is allowed.
◆ m_probe_iterations
| double HashJoinCost::m_probe_iterations |
|
private |
The number of iterations over the probe input.
Used by ProposeHashJoin() to account for probe re-scanning cost.
◆ m_spill_to_disk_probability
| double HashJoinCost::m_spill_to_disk_probability |
|
private |
The probability (range [0.0, 1.0]) of needing spill to disk.
The documentation for this class was generated from the following files: