[Groonga-commit] groonga/wikipedia-search at 5e2745f [master] Force to disable sequential scan

Back to archive index

Kouhei Sutou null+****@clear*****
Sat Nov 5 18:59:44 JST 2016


Kouhei Sutou	2016-11-05 18:59:44 +0900 (Sat, 05 Nov 2016)

  New Revision: 5e2745ff666ca0e698d1a1474585479eb12ce8a9
  https://github.com/groonga/wikipedia-search/commit/5e2745ff666ca0e698d1a1474585479eb12ce8a9

  Message:
    Force to disable sequential scan

  Modified files:
    benchmark/centos7/en-postgresql.sh

  Modified: benchmark/centos7/en-postgresql.sh (+6 -0)
===================================================================
--- benchmark/centos7/en-postgresql.sh    2016-11-05 18:33:25 +0900 (8b9c7b0)
+++ benchmark/centos7/en-postgresql.sh    2016-11-05 18:59:44 +0900 (be1f61e)
@@ -283,6 +283,7 @@ benchmark_search_pgroonga()
   work_mem_size='64MB'
   work_mem="SET work_mem = '${work_mem_size}';"
   search_path="SET search_path = \"\${user}\", public, pgroonga, pg_catalog;"
+  enable_seqscan="SET enable_seqscan = no;"
   cat "${benchmark_dir}/en-search-words.list" | while read search_word; do
     for i in $(seq ${n_search_tries}); do
       where="text @@ '${search_word}'"
@@ -290,6 +291,7 @@ benchmark_search_pgroonga()
       run sudo -u postgres -H psql -d ${pgroonga_db} \
           --command "${work_mem}" \
           --command "${search_path}" \
+          --command "${enable_seqscan}" \
           --command "\\timing" \
           --command "SELECT COUNT(*) FROM wikipedia WHERE ${where}"
     done
@@ -300,6 +302,7 @@ benchmark_search_pg_trgm()
 {
   work_mem_size='64MB'
   work_mem="SET work_mem = '${work_mem_size}';"
+  enable_seqscan="SET enable_seqscan = no;"
   cat "${benchmark_dir}/en-search-words.list" | while read search_word; do
     for i in $(seq ${n_search_tries}); do
       where="text LIKE '%${search_word}%'"
@@ -307,6 +310,7 @@ benchmark_search_pg_trgm()
       echo "pg_trgm: search: work_mem(${work_mem_size}): ${where}: ${i}:"
       run sudo -u postgres -H psql -d ${pg_trgm_db} \
           --command "${work_mem}" \
+          --command "${enable_seqscan}" \
           --command "\\timing" \
           --command "SELECT COUNT(*) FROM wikipedia WHERE ${where}"
     done
@@ -317,6 +321,7 @@ benchmark_search_textsearch()
 {
   work_mem_size='64MB'
   work_mem="SET work_mem = '${work_mem_size}';"
+  enable_seqscan="SET enable_seqscan = no;"
   cat "${benchmark_dir}/en-search-words.list" | while read search_word; do
     for i in $(seq ${n_search_tries}); do
       target="to_tsvector('english', text)"
@@ -325,6 +330,7 @@ benchmark_search_textsearch()
       echo "textsearch: search: work_mem(${work_mem_size}): ${where}: ${i}:"
       run sudo -u postgres -H psql -d ${textsearch_db} \
           --command "${work_mem}" \
+          --command "${enable_seqscan}" \
           --command "\\timing" \
           --command "SELECT COUNT(*) FROM wikipedia WHERE ${where}"
     done
-------------- next part --------------
HTML����������������������������...
Download 



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