MySQL 9.2.0
Source Code Documentation
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages Concepts
secondary_statistics.h
Go to the documentation of this file.
1/* Copyright (c) 2020, 2024, Oracle and/or its affiliates.
2
3 This program is free software; you can redistribute it and/or modify
4 it under the terms of the GNU General Public License, version 2.0,
5 as published by the Free Software Foundation.
6
7 This program is designed to work with certain software (including
8 but not limited to OpenSSL) that is licensed under separate terms,
9 as designated in a particular file or component or in included license
10 documentation. The authors of MySQL hereby grant you an additional
11 permission to link the program and your derivative works with the
12 separately licensed software that they have either included with
13 the program or referenced in the documentation.
14
15 This program is distributed in the hope that it will be useful,
16 but WITHOUT ANY WARRANTY; without even the implied warranty of
17 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 GNU General Public License, version 2.0, for more details.
19
20 You should have received a copy of the GNU General Public License
21 along with this program; if not, write to the Free Software
22 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
23
24#pragma once
25
26class THD;
27class Field;
28
29namespace secondary_statistics {
30
31/**
32 If secondary engine is available, return number of distinct values (NDV)
33 information for specified field.
34
35 @param thd The current thread.
36 @param field The field we request NDV for
37
38 @returns NDV if secondary engine is active and has information on column,
39 -1.0, otherwise
40 */
41double NumDistinctValues(THD *thd, const Field &field);
42
43} // namespace secondary_statistics
Definition: field.h:577
For each client connection we create a separate thread with THD serving as a thread/connection descri...
Definition: sql_lexer_thd.h:36
Definition: secondary_statistics.cc:35
double NumDistinctValues(THD *thd, const Field &field)
If secondary engine is available, return number of distinct values (NDV) information for specified fi...
Definition: secondary_statistics.cc:37