[Groonga-commit] groonga/groonga at 8741cd0 [master] Reduce needless sequential scan fallback

Back to archive index

Kouhei Sutou null+****@clear*****
Thu Feb 25 22:21:30 JST 2016


Kouhei Sutou	2016-02-25 22:21:30 +0900 (Thu, 25 Feb 2016)

  New Revision: 8741cd051193137bd0d8d22bc26441d96a2e324e
  https://github.com/groonga/groonga/commit/8741cd051193137bd0d8d22bc26441d96a2e324e

  Message:
    Reduce needless sequential scan fallback

  Modified files:
    lib/expr.c

  Modified: lib/expr.c (+2 -4)
===================================================================
--- lib/expr.c    2016-02-25 22:19:48 +0900 (71dad5d)
+++ lib/expr.c    2016-02-25 22:21:30 +0900 (0a1444b)
@@ -5561,9 +5561,7 @@ grn_table_select_index_equal(grn_ctx *ctx,
                             GRN_BULK_HEAD(si->query),
                             GRN_BULK_VSIZE(si->query));
       }
-      if (tid == GRN_ID_NIL) {
-        processed = GRN_TRUE;
-      } else {
+      if (tid != GRN_ID_NIL) {
         uint32_t sid;
         int32_t weight;
         grn_ii *ii = (grn_ii *)index;
@@ -5602,9 +5600,9 @@ grn_table_select_index_equal(grn_ctx *ctx,
                                si->logical_op);
           }
           grn_ii_cursor_close(ctx, ii_cursor);
-          processed = GRN_TRUE;
         }
       }
+      processed = GRN_TRUE;
     }
     if (processed) {
       grn_ii_resolve_sel_and(ctx, (grn_hash *)res, si->logical_op);
-------------- next part --------------
HTML����������������������������...
Download 



More information about the Groonga-commit mailing list
Back to archive index