mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
Speedups:
- Optimize away calls to hp_rec_hashnr() by cashing hash - Try to get more rows / block (to minimize overhead of HP_PTRS) in HEAP tables. storage/heap/_check.c: Optimize away calls to hp_rec_hashnr() by cashing hash. Print cleanups storage/heap/heapdef.h: Added place to hold calculated hash value for row storage/heap/hp_create.c: Try to get more rows / block (to minimize overhead of HP_PTRS) storage/heap/hp_delete.c: Optimize away calls to hp_rec_hashnr() by cashing hash. storage/heap/hp_hash.c: Optimize away calls to hp_rec_hashnr() by cashing hash. Remove some not needed DBUG_PRINT storage/heap/hp_test2.c: Increased max table size as now heap tables takes a bit more space (a few %) storage/heap/hp_write.c: Optimize away calls to hp_rec_hashnr() by cashing hash. Remove duplicated code More DBUG_PRINT storage/maria/ma_create.c: More DBUG_PRINT
This commit is contained in:
@ -149,8 +149,9 @@ int hp_delete_key(HP_INFO *info, register HP_KEYDEF *keyinfo,
|
||||
else if (pos->next_key)
|
||||
{
|
||||
empty=pos->next_key;
|
||||
pos->ptr_to_rec=empty->ptr_to_rec;
|
||||
pos->next_key=empty->next_key;
|
||||
pos->ptr_to_rec= empty->ptr_to_rec;
|
||||
pos->next_key= empty->next_key;
|
||||
pos->hash_of_key= empty->hash_of_key;
|
||||
}
|
||||
else
|
||||
keyinfo->hash_buckets--;
|
||||
@ -159,7 +160,7 @@ int hp_delete_key(HP_INFO *info, register HP_KEYDEF *keyinfo,
|
||||
DBUG_RETURN (0);
|
||||
|
||||
/* Move the last key (lastpos) */
|
||||
lastpos_hashnr = hp_rec_hashnr(keyinfo, lastpos->ptr_to_rec);
|
||||
lastpos_hashnr= lastpos->hash_of_key;
|
||||
/* pos is where lastpos should be */
|
||||
pos=hp_find_hash(&keyinfo->block, hp_mask(lastpos_hashnr, share->blength,
|
||||
share->records));
|
||||
@ -168,7 +169,7 @@ int hp_delete_key(HP_INFO *info, register HP_KEYDEF *keyinfo,
|
||||
empty[0]=lastpos[0];
|
||||
DBUG_RETURN(0);
|
||||
}
|
||||
pos_hashnr = hp_rec_hashnr(keyinfo, pos->ptr_to_rec);
|
||||
pos_hashnr= pos->hash_of_key;
|
||||
/* pos3 is where the pos should be */
|
||||
pos3= hp_find_hash(&keyinfo->block,
|
||||
hp_mask(pos_hashnr, share->blength, share->records));
|
||||
|
Reference in New Issue
Block a user