InnoDB: Optimize page_cur_search_with_match().

innobase/btr/btr0cur.c:
  Disable the mode PAGE_CUR_LE_OR_EXTENDS at compile-time
innobase/include/page0cur.h:
  Disable the mode PAGE_CUR_LE_OR_EXTENDS at compile-time
  Do not define PAGE_CUR_DBG unless #ifdef UNIV_SEARCH_DEBUG
innobase/page/page0cur.c:
  Disable the mode PAGE_CUR_LE_OR_EXTENDS at compile-time
  Disable PAGE_CUR_DBG unless #ifdef UNIV_SEARCH_DEBUG
  
  page_cur_try_search_shortcut(): Optimize the predicates
  (compare the result of page_cmp_dtuple_rec_with_match() against 0,
  use page_rec_is_supremum()).
  
  page_cur_search_with_match(): Compare the result of
  cmp_dtuple_rec_with_match() against zero, add UNIV_LIKELY hints,
  replace duplicated code with gotos.
This commit is contained in:
unknown 2005-06-30 11:15:06 +03:00
commit 384a0c0a0f
3 changed files with 66 additions and 48 deletions

View file

@ -26,11 +26,13 @@ Created 10/4/1994 Heikki Tuuri
#define PAGE_CUR_GE 2
#define PAGE_CUR_L 3
#define PAGE_CUR_LE 4
#define PAGE_CUR_LE_OR_EXTENDS 5 /* This is a search mode used in
/*#define PAGE_CUR_LE_OR_EXTENDS 5*/ /* This is a search mode used in
"column LIKE 'abc%' ORDER BY column DESC";
we have to find strings which are <= 'abc' or
which extend it */
#define PAGE_CUR_DBG 6
#ifdef UNIV_SEARCH_DEBUG
# define PAGE_CUR_DBG 6 /* As PAGE_CUR_LE, but skips search shortcut */
#endif /* UNIV_SEARCH_DEBUG */
#ifdef PAGE_CUR_ADAPT
# ifdef UNIV_SEARCH_PERF_STAT