Re: [Maria-developers] c3ecf0d6243: Optimize size of lex structures
Hi, Michael! On Sep 08, Michael Widenius wrote:
revision-id: c3ecf0d6243 (mariadb-10.5.2-269-gc3ecf0d6243) parent(s): c79c6f78205 author: Michael Widenius <michael.widenius@gmail.com> committer: Michael Widenius <michael.widenius@gmail.com> timestamp: 2020-09-02 20:58:33 +0300 message:
Optimize size of lex structures
LEX, st_select_lex, st_select_unit optimized for space: - Use bit fields for bool variables - Ensure that all bit fields are initialized (improves performance for init functions as all bit fields can be initalized with one memory access) - Move members around in above structures to remove alignment gaps
diff --git a/sql/sql_lex.h b/sql/sql_lex.h index f516219c01a..1f6e50d8b60 100644 --- a/sql/sql_lex.h +++ b/sql/sql_lex.h @@ -725,12 +725,15 @@ class st_select_lex_node { st_select_lex_node *next, **prev, /* neighbor list */ *master, *slave, /* vertical links */ *link_next, **link_prev; /* list of whole SELECT_LEX */ + enum sub_select_type linkage;
void init_query_common(); -public:
+public: ulonglong options; - + uint8 uncacheable; + bool distinct:1; + bool no_table_names_allowed:1; /* used for global order by */
I thought you didn't like this approach and preferred flags & DISTINCT instead. Either you forgot to change LEX to flags or you forgot to squash your commits.
/* result of this query can't be cached, bit field, can be :
Regards, Sergei VP of MariaDB Server Engineering and security@mariadb.org
participants (1)
-
Sergei Golubchik