paging

package
v1.1.0-beta.0...-68ac9ec Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 10, 2024 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MinPagingSize uint64 = 128

	MaxPagingSize = 50000

	Threshold uint64 = 960
)

A paging request may be separated into multi requests if there are more data than a page. The paging size grows from min to max. See https://github.com/pingcap/tidb/issues/36328 e.g. a paging request scans over range (r1, r200), it requires 128 rows in the first batch, if it's not drained, then the paging size grows, the new range is calculated like (r100, r200), then send a request again. Compare with the common unary request, paging request allows early access of data, it offers a streaming-like way processing data.

Variables

This section is empty.

Functions

func CalculateSeekCnt

func CalculateSeekCnt(expectCnt uint64) float64

CalculateSeekCnt calculates the seek count from expect count

func GrowPagingSize

func GrowPagingSize(size uint64, maxv uint64) uint64

GrowPagingSize grows the paging size and ensures it does not exceed MaxPagingSize

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL