Documentation
¶
Index ¶
- Constants
- func AbsoluteDateStringQuery(absolute string) (string, error)
- func CheckAbsoluteRegex(regex string, value string) bool
- func ParseAbsoluteQuery(absoluteQuery string, location *time.Location) (startDate, endDate time.Time, err error)
- func PullAbsoluteValue(value string) int64
- func ValidateDateFilters(params any, dateFiltersToValidate ...string) error
- type CorruptIndex
- type Index
- type IndexError
- type IndexHealthIssues
- type LowIndexScanTable
- type PageAndOrderParams
- type PageParams
- type ProblemIndex
Constants ¶
View Source
const ( TableIndexScanPercentageCheckHealthy = "healthy" TableIndexScanPercentageCheckProblem = "problem" TableIndexScanPercentageCheckEmptyTable = "empty_table" )
View Source
const ( IndexProblemReasonNeverUsedIndex = "Never-used index" IndexProblemReasonLowScanHighWrite = "Low scan, high write" IndexProblemReasonSeldomUsedLargeIndex = "Seldom-used large index" IndexProblemReasonHighWriteLargeNonBTreeIndex = "High write, large non-BTree index" )
View Source
const ( LastXHours string = "^last \\d+ hour(s)?$" LastDay string = "^last day$" LastXDays string = "^last \\d+ day(s)?$" LastMonth string = "^last month$" Yesterday string = "^yesterday$" )
Special query cases
View Source
const CorruptIndexQuery = `` /* 772-byte string literal not displayed */
View Source
const ExistingIndexQuery = `` /* 569-byte string literal not displayed */
View Source
const ProblemIndexQuery = `` /* 3289-byte string literal not displayed */
View Source
const TableIndexStatusQuery = `` /* 576-byte string literal not displayed */
Variables ¶
This section is empty.
Functions ¶
func AbsoluteDateStringQuery ¶
func CheckAbsoluteRegex ¶ added in v1.275.0
func ParseAbsoluteQuery ¶ added in v1.282.0
func PullAbsoluteValue ¶ added in v1.275.0
func ValidateDateFilters ¶ added in v1.251.0
Types ¶
type CorruptIndex ¶ added in v1.276.0
type IndexError ¶ added in v1.276.0
type IndexHealthIssues ¶ added in v1.276.0
type IndexHealthIssues struct { CorruptIndexes []CorruptIndex `json:"corrupt_indexes"` LowIndexScanTables []LowIndexScanTable `json:"low_index_scan_tables"` ProblemIndexes []ProblemIndex `json:"problem_indexes"` }
type LowIndexScanTable ¶ added in v1.276.0
type PageAndOrderParams ¶ added in v1.274.0
type PageAndOrderParams struct { PageParams OrderBy string `json:"order_by,omitempty"` Order string `json:"order,omitempty"` }
type PageParams ¶ added in v1.251.0
type PageParams struct { Limit int64 `json:"limit,omitempty"` // Limit number of items returned in list (default: 0 (no limit)) Offset int64 `json:"offset,omitempty"` // Offset in list (default: 0 (no offset)) }
func (*PageParams) EnforceLimit ¶ added in v1.251.0
func (params *PageParams) EnforceLimit()
func (*PageParams) Validate ¶ added in v1.251.0
func (params *PageParams) Validate() error
type ProblemIndex ¶ added in v1.276.0
type ProblemIndex struct { TableName string `json:"table_name"` IndexName string `json:"index_name"` Reason string `json:"reason"` IndexScanPercentage float64 `json:"index_scan_percentage"` IndexSize string `json:"index_size"` TableSize string `json:"table_size"` }
func FindCommonNeverUsedIndexes ¶ added in v1.276.0
func FindCommonNeverUsedIndexes(list1, list2 []ProblemIndex) []ProblemIndex
Click to show internal directories.
Click to hide internal directories.