Ran pgindent [skip ci]

This commit is contained in:
Andrew Kane
2024-09-25 14:03:51 -07:00
parent 2df9f24aad
commit a100dc67e5

View File

@@ -124,22 +124,21 @@ hnswcostestimate(PlannerInfo *root, IndexPath *path, double loop_count,
/*
* HNSW cost estimation follows a formula that accounts for the total
* number of tuples indexed combined with the parameters that most influence
* the duration of the index scan, namely:
* m - the number of tuples that are scanned in each step of the HNSW
* graph traversal
* number of tuples indexed combined with the parameters that most
* influence the duration of the index scan, namely: m - the number of
* tuples that are scanned in each step of the HNSW graph traversal
* ef_search - which influences the total number of steps taken at layer 0
*
* The source of the vector data can impact how many steps it takes to
* converge on the set of vectors to return to the executor. Currently,
* we use a hardcoded scaling factor (HNSWScanScalingFactor) to help
* converge on the set of vectors to return to the executor. Currently, we
* use a hardcoded scaling factor (HNSWScanScalingFactor) to help
* influence that, but this could later become a configurable parameter
* based on the cost estimations.
*
* The tuple estimator formula is below:
*
* numIndexTuples = (entryLevel * m) +
* (layer0TuplesMax * layer0Selectivity)
* numIndexTuples = (entryLevel * m) + (layer0TuplesMax *
* layer0Selectivity)
*
* "entryLevel * m" represents the floor of tuples we need to scan to get
* to layer 0 (L0).