Navigation Menu

Skip to content

Commit

Permalink
Remove needless code
Browse files Browse the repository at this point in the history
The index cursor counts exact number of records in range. We doesn't
need estimate number of records in range.
  • Loading branch information
kou committed Nov 16, 2012
1 parent 1b779d2 commit 9890271
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions ha_mroonga.cpp
Expand Up @@ -6120,10 +6120,6 @@ ha_rows ha_mroonga::storage_records_in_range(uint key_nr, key_range *range_min,
}
grn_obj_unlink(ctx, index_cursor);
grn_table_cursor_close(ctx, cursor);

uint table_size = grn_table_size(ctx, grn_table);
uint cardinality = grn_table_size(ctx, grn_index_tables[key_nr]);
row_count = ceil((double)table_size * ((double)row_count / (double)cardinality));
}
DBUG_RETURN(row_count);
}
Expand Down

0 comments on commit 9890271

Please sign in to comment.