Navigation Menu

Skip to content

Commit

Permalink
groonga_fast_order_limit is not incremented (#845) Thanks to Mitsuhir…
Browse files Browse the repository at this point in the history
…o Shibuya
  • Loading branch information
Kentoku committed Apr 2, 2011
1 parent 7a8f75d commit 1431b4c
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 1 deletion.
13 changes: 13 additions & 0 deletions doc/ja/source/news.rst
Expand Up @@ -5,6 +5,19 @@
最新ニュース
============

0.6 リリース -
-------------------------

修正
++++

* ORDER BY LIMITの高速化が機能しないケースがある問題の修正。#845

感謝
++++

* Mitsuhiro Shibuyaさん

0.5 リリース - 2011/03/29
-------------------------

Expand Down
2 changes: 1 addition & 1 deletion ha_mroonga.cc
Expand Up @@ -2392,7 +2392,7 @@ void ha_mroonga::check_fast_order_limit()

if (
thd_sql_command(ha_thd()) == SQLCOM_SELECT &&
!select_lex->n_sum_items &&
!select_lex->with_sum_func &&
!select_lex->group_list.elements &&
!select_lex->having &&
select_lex->table_list.elements == 1 &&
Expand Down
12 changes: 12 additions & 0 deletions test/sql/r/order_limit_performance.result
Expand Up @@ -120,4 +120,16 @@ aa ii uu ee oo 1
show status like 'groonga_fast_order_limit';
Variable_name Value
groonga_fast_order_limit 8
select count(*) from t1 where match(c3) against("ii");
count(*)
3
show status like 'groonga_fast_order_limit';
Variable_name Value
groonga_fast_order_limit 8
select * from t1 where match(c3) against("ii") order by c1 desc limit 1;
c1 c2 c3 _id _score
5 50 aa ii uu ii oo 5 2
show status like 'groonga_fast_order_limit';
Variable_name Value
groonga_fast_order_limit 9
drop table t1;
4 changes: 4 additions & 0 deletions test/sql/t/order_limit_performance.test
Expand Up @@ -59,6 +59,10 @@ select c3, _id from t1 where match(c3) against("ii") order by _id;
show status like 'groonga_fast_order_limit';
select c3, _id from t1 where match(c3) against("ii") order by _id limit 1;
show status like 'groonga_fast_order_limit';
select count(*) from t1 where match(c3) against("ii");
show status like 'groonga_fast_order_limit';
select * from t1 where match(c3) against("ii") order by c1 desc limit 1;
show status like 'groonga_fast_order_limit';
drop table t1;

--source suite/groonga/include/groonga_deinit.inc

0 comments on commit 1431b4c

Please sign in to comment.