diff options
author | Varun Gupta <varun.gupta@mariadb.com> | 2020-03-28 12:31:22 +0530 |
---|---|---|
committer | Varun Gupta <varun.gupta@mariadb.com> | 2020-06-29 14:04:07 +0530 |
commit | 077b71e4e5e5ad4aa2b4a7f6a1b49d457f5ceb55 (patch) | |
tree | c4a09ebb32e662a1243c23601ab6bd65a321668f /sql/sql_class.h | |
parent | ead98fe5d34912578445d42e620c8ed95df4c433 (diff) | |
download | mariadb-git-10.5-varun2.tar.gz |
MDEV-21829: Use packed sort keys in Unique objects10.5-varun2
The task deals with packing the values stored in the Unique tree for each record.
The changes brought by this feature is:
1) Unique tree can have dynamic length keys
2) Format of keys looks like
<key_length> <packed_value1> <packed_value2> ....... <packed_valueN>
Unique class is currently used in
1) agg_func(DISTINCT col)
Here most aggregate functions like SUM, AVG accept only fixed size arguments
so it is not beneficial to use packing for these. Packing is done for
COUNT and GROUP_CONCAT (or JSON_ARRAYAGG) aggregate function as these are meaningful
2) index-merge stores row-ids
index merge stores row-ids which are of fixed size, so packing is not required
3) Engine Independent Table statistics
Packing is done here for variable length data types
This task is an extension to MDEV-21580.
Diffstat (limited to 'sql/sql_class.h')
-rw-r--r-- | sql/sql_class.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/sql/sql_class.h b/sql/sql_class.h index 58a786ed33c..c158d7c5a14 100644 --- a/sql/sql_class.h +++ b/sql/sql_class.h @@ -6454,6 +6454,7 @@ struct SORT_FIELD: public SORT_FIELD_ATTR Field *field; /* Field to sort */ Item *item; /* Item if not sorting fields */ bool reverse; /* if descending sort */ + void setup(Field *fld, bool exclude_nulls, bool with_suffix); }; |