GenericScanController
, GroupFetchScanController
, ScanController
, ScanControllerRowSource
, ScanManager
, StoreCostController
B2ICostController
, B2IForwardScan
, B2IMaxScan
, BTreeCostController
, BTreeForwardScan
, BTreeMaxScan
, BTreeScan
, GenericCostController
, GenericScanController
, HeapCompressScan
, HeapCostController
, HeapScan
, MergeScan
, MergeScanRowSource
, Scan
, SortBufferRowSource
, SortBufferScan
, SortScan
public interface RowCountable
ScanController
,
StoreCostController
Modifier and Type | Method | Description |
---|---|---|
long |
getEstimatedRowCount() |
Get the total estimated number of rows in the container.
|
void |
setEstimatedRowCount(long count) |
Set the total estimated number of rows in the container.
|
long getEstimatedRowCount() throws StandardException
The number is a rough estimate and may be grossly off. In general the server will cache the row count and then occasionally write the count unlogged to a backing store. If the system happens to shutdown before the store gets a chance to update the row count it may wander from reality.
For btree conglomerates this call will return the count of both user rows and internal implementaation rows. The "BTREE" implementation generates 1 internal implementation row for each page in the btree, and it generates 1 internal implementation row for each branch row. For this reason it is recommended that clients if possible use the count of rows in the heap table to estimate the number of rows in the index rather than use the index estimated row count.
StandardException
- Standard exception policy.void setEstimatedRowCount(long count) throws StandardException
Often, after a scan, the client of RawStore has a much better estimate of the number of rows in the container than what store has. Currently, a scan, followed by an update of the estimate, will be performed when:
IndexStatisticsDaemon
)This routine can also be used to set the estimated row count in the index to the number of rows in the base table, another workaround for the problem that index estimated row count includes non-user rows.
count
- the estimated number of rows in the container.StandardException
- Standard exception policy.Apache Derby V10.14 Internals - Copyright © 2004,2018 The Apache Software Foundation. All Rights Reserved.