Kouhei Sutou
null+****@clear*****
Mon Nov 14 00:49:41 JST 2016
Kouhei Sutou 2016-11-14 00:49:41 +0900 (Mon, 14 Nov 2016) New Revision: 10e9b82c1f1cc33a6b6a32c324438ff143c9627d https://github.com/groonga/wikipedia-search/commit/10e9b82c1f1cc33a6b6a32c324438ff143c9627d Message: Show statistics after data load Modified files: benchmark/centos7/postgresql.sh Modified: benchmark/centos7/postgresql.sh (+22 -0) =================================================================== --- benchmark/centos7/postgresql.sh 2016-11-14 00:32:12 +0900 (e08176c) +++ benchmark/centos7/postgresql.sh 2016-11-14 00:49:41 +0900 (64bb3b4) @@ -231,6 +231,28 @@ load_data_pgroonga() echo "PGroonga: data: load: size:" run sudo -u postgres -H \ sh -c "du -hsc /var/lib/pgsql/${pg_version}/data/base/$(database_oid ${pgroonga_db})/*" + + echo "PGroonga: data: load: statistics" + select=$(cat <<EOF) +SELECT + AVG(char_length(title)) as title_char_length_avg, + MIN(char_length(title)) as title_char_length_min, + MAX(char_length(title)) as title_char_length_max, + AVG(octet_length(title)) as title_byte_length_avg, + MIN(octet_length(title)) as title_byte_length_min, + MAX(octet_length(title)) as title_byte_length_max, + AVG(char_length(text)) as text_char_length_avg, + MIN(char_length(text)) as text_char_length_min, + MAX(char_length(text)) as text_char_length_max, + AVG(octet_length(text)) as text_byte_length_avg, + MIN(octet_length(text)) as text_byte_length_min, + MAX(octet_length(text)) as text_byte_length_max + FROM + wikipedia; +EOF + run sudo -u postgres -H psql -d ${pgroonga_db} \ + --command "\\timing" \ + --command "${select}" } load_data_pg_trgm() -------------- next part -------------- HTML����������������������������...Download