[Groonga-commit] groonga/wikipedia-search at 7ebec46 [master] Add force index scan pattern

Back to archive index

Kouhei Sutou null+****@clear*****
Sat May 23 23:34:07 JST 2015


Kouhei Sutou	2015-05-23 23:34:07 +0900 (Sat, 23 May 2015)

  New Revision: 7ebec46a577b81456f860b0c7f5110d5faf7aa8f
  https://github.com/groonga/wikipedia-search/commit/7ebec46a577b81456f860b0c7f5110d5faf7aa8f

  Message:
    Add force index scan pattern

  Modified files:
    benchmark/centos6/pgroonga.sh

  Modified: benchmark/centos6/pgroonga.sh (+14 -0)
===================================================================
--- benchmark/centos6/pgroonga.sh    2015-05-23 23:33:53 +0900 (a4e06d1)
+++ benchmark/centos6/pgroonga.sh    2015-05-23 23:34:07 +0900 (b3a254d)
@@ -181,6 +181,19 @@ benchmark_search_pgroonga()
   done
 }
 
+benchmark_search_pgroonga_force_index_scan()
+{
+  force_index_scan="SET enable_seqscan = off; SET enable_bitmapscan = off;"
+  cat "${benchmark_dir}/search-words.list" | while read search_word; do
+    for i in $(seq ${n_search_tries}); do
+      where="text @@ '${search_word}'"
+      echo "PGroonga: search: force index scan: ${where}: ${i}:"
+      time run sudo -u postgres -H psql -d ${pgroonga_db} \
+           --command "${force_index_scan} SELECT COUNT(*) FROM wikipedia WHERE ${where}"
+    done
+  done
+}
+
 benchmark_search_pg_bigm()
 {
   cat "${benchmark_dir}/search-words.list" | while read search_word; do
@@ -211,4 +224,5 @@ benchmark_create_index_pgroonga
 benchmark_create_index_pg_bigm
 
 benchmark_search_pgroonga
+benchmark_search_pgroonga_force_index_scan
 benchmark_search_pg_bigm
-------------- next part --------------
HTML����������������������������...
Download 



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