PgCustomScanPath
Namespace: Ankus
Assembly: Ankus.Runtime.dll
Describes one way a custom scan can produce a table’s rows, with the costs the planner compares against other paths.
public readonly struct PgCustomScanPath : IEquatable<PgCustomScanPath>Costs use the same units as the table’s existing paths, so a path cheaper than CheapestTotalCost usually wins.
Implements: IEquatable<PgCustomScanPath>
Constructors
Section titled “Constructors”PgCustomScanPath(double, double)
Section titled “PgCustomScanPath(double, double)”Describes one way a custom scan can produce a table’s rows, with the costs the planner compares against other paths.
public PgCustomScanPath(double StartupCost, double TotalCost)Parameters:
StartupCost — double
The cost before the first row, in PostgreSQL’s planner units.
TotalCost — double
The cost to produce every row, at least StartupCost.
Costs use the same units as the table’s existing paths, so a path cheaper than CheapestTotalCost usually wins.
Properties
Section titled “Properties”Gets bytes the plan keeps and passes to Begin(PgCustomScanContext), such as an encoded choice.
public ReadOnlyMemory<byte> Data { get; init; }Value: ReadOnlyMemory<byte>
A cached plan can be executed many times, so the data must remain valid without state from planning.
Gets the estimated row count before the query’s conditions, or null to keep the planner’s estimate.
public double? Rows { get; init; }Value: double?
A path that depends on an outer query’s values, such as inside a lateral join, always uses the planner’s estimate.
SortKeys
Section titled “SortKeys”Gets the columns by which the path returns its rows in order, most significant first, or null when the rows have no order.
public IReadOnlyList<PgCustomScanSortKey>? SortKeys { get; init; }Value: IReadOnlyList<PgCustomScanSortKey>
An ordered path can save a query a sort, for ORDER BY, a merge join or a LIMIT. The planner keeps
only the leading keys the query can use. On a parallel path, each process returns its own rows in this order, and
PostgreSQL merges them.
StartupCost
Section titled “StartupCost”The cost before the first row, in PostgreSQL’s planner units.
public double StartupCost { get; init; }Value: double
TotalCost
Section titled “TotalCost”The cost to produce every row, at least StartupCost.
public double TotalCost { get; init; }Value: double
Methods
Section titled “Methods”Deconstruct(out double, out double)
Section titled “Deconstruct(out double, out double)”public void Deconstruct(out double StartupCost, out double TotalCost)Parameters:
StartupCost — double
TotalCost — double
Equals(PgCustomScanPath)
Section titled “Equals(PgCustomScanPath)”public bool Equals(PgCustomScanPath other)Parameters:
other — PgCustomScanPath
Returns: bool
Equals(object)
Section titled “Equals(object)”public override bool Equals(object obj)Parameters:
obj — object
Returns: bool
GetHashCode()
Section titled “GetHashCode()”public override int GetHashCode()Returns: int
ToString()
Section titled “ToString()”public override string ToString()Returns: string
Operators
Section titled “Operators”operator ==(PgCustomScanPath, PgCustomScanPath)
Section titled “operator ==(PgCustomScanPath, PgCustomScanPath)”public static bool operator ==(PgCustomScanPath left, PgCustomScanPath right)Parameters:
left — PgCustomScanPath
right — PgCustomScanPath
Returns: bool
operator !=(PgCustomScanPath, PgCustomScanPath)
Section titled “operator !=(PgCustomScanPath, PgCustomScanPath)”public static bool operator !=(PgCustomScanPath left, PgCustomScanPath right)Parameters:
left — PgCustomScanPath
right — PgCustomScanPath
Returns: bool