mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
Added count of my_sync calls (to SHOW STATUS)
tmp_table_size can now be set to 0 (to disable in memory internal temp tables) Improved speed for internal Maria temp tables: - Don't use packed keys, except with long text fields. - Don't copy key all accessed pages during key search. Some new benchmark tests to sql-bench (for group by) BUILD/compile-pentium64-gcov: Update script to use same pentium_config flags as other tests BUILD/compile-pentium64-gprof: Update script to use same pentium_config flags as other tests include/my_sys.h: Added count of my_sync calls mysql-test/r/variables.result: tmp_table_size can now be set to 0 sql-bench/test-select.sh: Added some new test for GROUP BY on a not key field and group by with different order by sql/mysqld.cc: Added count of my_sync calls tmp_table_size can now be set to 0 (to disable in memory internal temp tables) sql/sql_select.cc: If tmp_table_size is 0, don't use in memory temp tables (good for benchmarking MyISAM/Maria temp tables) Don't pack keys for Maria tables; The 8K page size makes packed keys too slow for temp tables. storage/maria/ma_key_recover.h: Moved definition to maria_def.h storage/maria/ma_page.c: Moved code used to simplify comparing of identical Maria tables to own function (page_cleanup()) Fixed that one can read a page with a read lock. storage/maria/ma_rkey.c: For not exact key reads, cache the page where we found key (to speed up future read-next/read-prev calls) storage/maria/ma_search.c: Moved code to cache last key page to separate function. Instead of copying pages, only get a link to the page. This notable speeds up key searches on bigger tables. storage/maria/ma_write.c: Added comment storage/maria/maria_def.h: Moved page_cleanup() to separate function.
This commit is contained in:
@ -10168,7 +10168,8 @@ create_tmp_table(THD *thd,TMP_TABLE_PARAM *param,List<Item> &fields,
|
||||
/* future: storage engine selection can be made dynamic? */
|
||||
if (blob_count || using_unique_constraint ||
|
||||
(select_options & (OPTION_BIG_TABLES | SELECT_SMALL_RESULT)) ==
|
||||
OPTION_BIG_TABLES || (select_options & TMP_TABLE_FORCE_MYISAM))
|
||||
OPTION_BIG_TABLES || (select_options & TMP_TABLE_FORCE_MYISAM) ||
|
||||
!thd->variables.tmp_table_size)
|
||||
{
|
||||
share->db_plugin= ha_lock_engine(0, TMP_ENGINE_HTON);
|
||||
table->file= get_new_handler(share, &table->mem_root,
|
||||
@ -10707,7 +10708,7 @@ static bool create_internal_tmp_table(TABLE *table,TMP_TABLE_PARAM *param,
|
||||
{
|
||||
/* Create an unique key */
|
||||
bzero((char*) &keydef,sizeof(keydef));
|
||||
keydef.flag=HA_NOSAME | HA_BINARY_PACK_KEY | HA_PACK_KEY;
|
||||
keydef.flag=HA_NOSAME;
|
||||
keydef.keysegs= keyinfo->key_parts;
|
||||
keydef.seg= seg;
|
||||
}
|
||||
@ -10732,7 +10733,7 @@ static bool create_internal_tmp_table(TABLE *table,TMP_TABLE_PARAM *param,
|
||||
seg->type= keyinfo->key_part[i].type;
|
||||
/* Tell handler if it can do suffic space compression */
|
||||
if (field->real_type() == MYSQL_TYPE_STRING &&
|
||||
keyinfo->key_part[i].length > 4)
|
||||
keyinfo->key_part[i].length > 32)
|
||||
seg->flag|= HA_SPACE_PACK;
|
||||
}
|
||||
if (!(field->flags & NOT_NULL_FLAG))
|
||||
|
Reference in New Issue
Block a user