Fujimoto Seiji
null+****@clear*****
Thu Dec 21 15:24:00 JST 2017
Fujimoto Seiji 2017-12-06 12:43:38 +0900 (Wed, 06 Dec 2017) New Revision: 0ca72bef58d22f6c9de30842fc63e7fce0bbbeb1 https://github.com/mroonga/mroonga/commit/0ca72bef58d22f6c9de30842fc63e7fce0bbbeb1 Merged 0e28a82: Merge pull request #179 from fujimotos/sf/count-skip-on-multicol Message: count_skip: enable optimization for multi-column index Mroonga has a feature to skip the data retrieval routine when the MySQL/MariaDB server has no interest on the actual row records[1]. This patch enables the optimimization for a multi-column fulltext index query like this: SELECT COUNT(*) FROM tbl WHERE MATCH (col1, col2) AGAINST ('q'); [1] http://mroonga.org/docs/reference/optimizations.html#row-count Modified files: lib/mrn_count_skip_checker.cpp Modified: lib/mrn_count_skip_checker.cpp (+4 -12) =================================================================== --- lib/mrn_count_skip_checker.cpp 2017-11-29 10:48:06 +0900 (216f3b7b) +++ lib/mrn_count_skip_checker.cpp 2017-12-06 12:43:38 +0900 (2c85517e) @@ -133,18 +133,10 @@ namespace mrn { { Item_func *func_item = static_cast<Item_func *>(where); if (func_item->functype() == Item_func::FT_FUNC) { - if (select_lex_->select_n_where_fields == 1) { - GRN_LOG(ctx_, GRN_LOG_DEBUG, - "[mroonga][count-skip][true] " - "only one full text search condition"); - DBUG_RETURN(true); - } else { - GRN_LOG(ctx_, GRN_LOG_DEBUG, - "[mroonga][count-skip][false] " - "full text search condition and more conditions: %u", - select_lex_->select_n_where_fields); - DBUG_RETURN(false); - } + GRN_LOG(ctx_, GRN_LOG_DEBUG, + "[mroonga][count-skip][true] " + "only one full text search condition"); + DBUG_RETURN(true); } else { skippable = is_skippable(func_item); if (skippable) { -------------- next part -------------- HTML����������������������������... URL: https://lists.osdn.me/mailman/archives/groonga-mysql-commit/attachments/20171221/068e605e/attachment.htm