MySQL
8.4.2
Source Code Documentation
opt_statistics.h
Go to the documentation of this file.
1
#ifndef OPT_STATISTICS_INCLUDED
2
#define OPT_STATISTICS_INCLUDED
3
4
/*
5
Copyright (c) 2014, 2024, Oracle and/or its affiliates.
6
7
This program is free software; you can redistribute it and/or modify
8
it under the terms of the GNU General Public License, version 2.0,
9
as published by the Free Software Foundation.
10
11
This program is designed to work with certain software (including
12
but not limited to OpenSSL) that is licensed under separate terms,
13
as designated in a particular file or component or in included license
14
documentation. The authors of MySQL hereby grant you an additional
15
permission to link the program and your derivative works with the
16
separately licensed software that they have either included with
17
the program or referenced in the documentation.
18
19
This program is distributed in the hope that it will be useful,
20
but WITHOUT ANY WARRANTY; without even the implied warranty of
21
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22
GNU General Public License, version 2.0, for more details.
23
24
You should have received a copy of the GNU General Public License
25
along with this program; if not, write to the Free Software
26
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
27
28
#include <sys/types.h>
29
30
#include "
my_inttypes.h
"
// IWYU pragma: keep
31
32
struct
TABLE
;
33
34
typedef
float
rec_per_key_t
;
35
class
KEY
;
36
37
/**
38
Guesstimate for "records per key" when index statistics is not available.
39
40
@param table the table
41
@param key the index
42
@param used_keyparts the number of key part that should be included in the
43
estimate
44
45
@return estimated records per key value
46
*/
47
48
rec_per_key_t
guess_rec_per_key
(
const
TABLE
*
const
table
,
const
KEY
*
const
key
,
49
uint used_keyparts);
50
51
#endif
/* OPT_STATISTICS_INCLUDED */
KEY
Definition:
key.h:113
rec_per_key_t
float rec_per_key_t
Data type for records per key estimates that are stored in the KEY::rec_per_key_float[] array.
Definition:
key.h:96
my_inttypes.h
Some integer typedefs for easier portability.
binlog::service::iterators::tests::table
static PFS_engine_table_share_proxy table
Definition:
pfs.cc:61
guess_rec_per_key
rec_per_key_t guess_rec_per_key(const TABLE *const table, const KEY *const key, uint used_keyparts)
Guesstimate for "records per key" when index statistics is not available.
Definition:
opt_statistics.cc:61
rec_per_key_t
float rec_per_key_t
Definition:
opt_statistics.h:32
key
required string key
Definition:
replication_asynchronous_connection_failover.proto:60
TABLE
Definition:
table.h:1406
sql
opt_statistics.h
Generated by
1.9.2