mirror of
https://github.com/MariaDB/server.git
synced 2025-02-05 05:12:17 +01:00
52c29f3bdc
Heap tables are allocated blocks to store rows according to my_default_record_cache (mapped to the server global variable read_buffer_size). This causes performance issues when the record length is big (> 1000 bytes) and the my_default_record_cache is small. Changed to instead split the default heap allocation to 1/16 of the allowed space and not use my_default_record_cache anymore when creating the heap. The allocation is also aligned to be just under a power of 2. For some test that I have been running, which was using record length=633, the speed of the query doubled thanks to this change. Other things: - Fixed calculation of max_records passed to hp_create() to take into account padding between records. - Updated calculation of memory needed by heap tables. Before we did not take into account internal structures needed to access rows. - Changed block sized for memory_table from 1 to 16384 to get less fragmentation. This also avoids a problem where we need 1K to manage index and row storage which was not counted for before. - Moved heap memory usage to a separate test for 32 bit. - Allocate all data blocks in heap in powers of 2. Change reported memory usage for heap to reflect this. Reviewed-by: Sergei Golubchik <serg@mariadb.org>
48 lines
1.4 KiB
Text
48 lines
1.4 KiB
Text
SET @@session.auto_increment_increment=40960;
|
|
Warnings:
|
|
Warning 1292 Truncated incorrect auto_increment_increment value: '40960'
|
|
SELECT @@session.auto_increment_increment;
|
|
@@session.auto_increment_increment
|
|
8192
|
|
SET @@session.tmp_table_size=40960;
|
|
Warnings:
|
|
Warning 1292 Truncated incorrect tmp_table_size value: '40960'
|
|
SELECT @@session.tmp_table_size;
|
|
@@session.tmp_table_size
|
|
16384
|
|
SET @@session.max_join_size=40960;
|
|
Warnings:
|
|
Warning 1292 Truncated incorrect max_join_size value: '40960'
|
|
SELECT @@session.max_join_size;
|
|
@@session.max_join_size
|
|
8192
|
|
SET @@session.use_stat_tables= COMPLEMENTARY;
|
|
SELECT @@session.use_stat_tables;
|
|
@@session.use_stat_tables
|
|
COMPLEMENTARY
|
|
SET @@session.use_stat_tables= PREFERABLY;
|
|
Warnings:
|
|
Warning 1292 Truncated incorrect use_stat_tables value: 'PREFERABLY'
|
|
SELECT @@session.use_stat_tables;
|
|
@@session.use_stat_tables
|
|
COMPLEMENTARY
|
|
SET @@session.use_stat_tables= 2;
|
|
Warnings:
|
|
Warning 1292 Truncated incorrect use_stat_tables value: '2'
|
|
SELECT @@session.use_stat_tables;
|
|
@@session.use_stat_tables
|
|
COMPLEMENTARY
|
|
SET @@session.sql_mode= 'REAL_AS_FLOAT';
|
|
SELECT @@session.sql_mode;
|
|
@@session.sql_mode
|
|
REAL_AS_FLOAT
|
|
SET @@session.sql_mode= 'REAL_AS_FLOAT,ANSI_QUOTES';
|
|
SELECT @@session.sql_mode;
|
|
@@session.sql_mode
|
|
REAL_AS_FLOAT,ANSI_QUOTES
|
|
SET @@session.sql_mode= 'ANSI_QUOTES,IGNORE_SPACE';
|
|
Warnings:
|
|
Warning 1292 Truncated incorrect sql_mode value: 'ANSI_QUOTES,IGNORE_SPACE'
|
|
SELECT @@session.sql_mode;
|
|
@@session.sql_mode
|
|
ANSI_QUOTES
|