mariadb/storage/maria
Monty 1f040ae048 MDEV-34043 Drastically slower query performance between CentOS (2sec) and Rocky (48sec)
One cause of the slowdown is because the ftruncate call can be much
slower on some systems.  ftruncate() is called by Aria for internal
temporary tables, tables created by the optimizer, when the upper level
asks Aria to delete the previous result set. This is needed when some
content from previous tables changes.

I have now changed Aria so that for internal temporary tables we don't
call ftruncate() anymore for maria_delete_all_rows().

I also had to update the Aria repair code to use the logical datafile
size and not the on-disk datafile size, which may contain data from a
previous result set.  The repair code is called to create indexes for
the internal temporary table after it is filled.
I also replaced a call to mysql_file_size() with a pwrite() in
_ma_bitmap_create_first().

Reviewer: Sergei Petrunia <sergey@mariadb.com>
Tester: Dave Gosselin <dave.gosselin@mariadb.com>
2024-08-21 22:47:29 +03:00
..
libmarias3@3846890513
unittest
aria_chk.c
aria_dump_log.c
aria_ftdump.c
aria_pack.c
aria_read_log.c
aria_s3_copy.cc
CMakeLists.txt
file_formats.txt
ft_maria.c
ha_maria.cc
ha_maria.h
ha_s3.cc
ha_s3.h
lockman.c
lockman.h
ma_backup.c
ma_bitmap.c
ma_blockrec.c
ma_blockrec.h
ma_cache.c
ma_changed.c
ma_check.c
ma_check.h
ma_check_standalone.h
ma_checkpoint.c
ma_checkpoint.h
ma_checksum.c
ma_close.c
ma_commit.c
ma_commit.h
ma_control_file.c
ma_control_file.h
ma_create.c
ma_crypt.c
ma_crypt.h
ma_dbug.c
ma_delete.c
ma_delete_all.c
ma_delete_table.c
ma_dynrec.c
ma_extra.c
ma_ft_boolean_search.c
ma_ft_eval.c
ma_ft_eval.h
ma_ft_nlq_search.c
ma_ft_parser.c
ma_ft_stem.c
ma_ft_test1.c
ma_ft_test1.h
ma_ft_update.c
ma_ftdefs.h
ma_fulltext.h
ma_info.c
ma_init.c
ma_key.c
ma_key_recover.c
ma_key_recover.h
ma_keycache.c
ma_locking.c
ma_loghandler.c
ma_loghandler.h
ma_loghandler_lsn.h
ma_norec.c
ma_open.c
ma_packrec.c
ma_page.c
ma_pagecache.c
ma_pagecache.h
ma_pagecaches.c
ma_pagecrc.c
ma_panic.c
ma_preload.c
ma_range.c
ma_recovery.c
ma_recovery.h
ma_recovery_util.c
ma_recovery_util.h
ma_rename.c
ma_rfirst.c
ma_rkey.c
ma_rlast.c
ma_rnext.c
ma_rnext_same.c
ma_rprev.c
ma_rrnd.c
ma_rsame.c
ma_rsamepos.c
ma_rt_index.c
ma_rt_index.h
ma_rt_key.c
ma_rt_key.h
ma_rt_mbr.c
ma_rt_mbr.h
ma_rt_split.c
ma_rt_test.c
ma_scan.c
ma_search.c
ma_servicethread.c
ma_servicethread.h
ma_sort.c
ma_sp_defs.h
ma_sp_key.c
ma_sp_test.c
ma_state.c
ma_state.h
ma_static.c
ma_statrec.c
ma_test1.c
ma_test2.c
ma_test3.c
ma_test_all.res
ma_test_all.sh
ma_test_big.sh
ma_test_force_start.pl
ma_test_recovery
ma_trnman.h
ma_unique.c
ma_update.c
ma_write.c
maria_def.h
s3.cnf
s3_func.c
s3_func.h
tablockman.c
tablockman.h
test_aria_s3_copy.sh
test_ma_backup.c
test_pack
trnman.c
trnman.h
trnman_public.h