[Groonga-commit] pgroonga/pgroonga at 6835862 [master] Add a test for bitmapscan

Back to archive index

Kouhei Sutou null+****@clear*****
Sun Jan 18 22:58:37 JST 2015


Kouhei Sutou	2015-01-18 22:58:37 +0900 (Sun, 18 Jan 2015)

  New Revision: 6835862509e87296812fbbf34ba24469aee62d17
  https://github.com/pgroonga/pgroonga/commit/6835862509e87296812fbbf34ba24469aee62d17

  Message:
    Add a test for bitmapscan

  Added files:
    expected/text/bitmapscan.out
    sql/text/bitmapscan.sql

  Added: expected/text/bitmapscan.out (+21 -0) 100644
===================================================================
--- /dev/null
+++ expected/text/bitmapscan.out    2015-01-18 22:58:37 +0900 (8ac6955)
@@ -0,0 +1,21 @@
+CREATE TABLE memos (
+  id integer,
+  content text
+);
+INSERT INTO memos VALUES (1, 'PostgreSQL is a RDBMS.');
+INSERT INTO memos VALUES (2, 'Groonga is fast full text search engine.');
+INSERT INTO memos VALUES (3, 'PGroonga is a PostgreSQL extension that uses Groonga.');
+CREATE INDEX grnindex ON memos USING pgroonga (content);
+SET enable_seqscan = off;
+SET enable_indexscan = off;
+SET enable_bitmapscan = on;
+SELECT id, content
+  FROM memos
+ WHERE content %% 'Groonga';
+ id |                        content                        
+----+-------------------------------------------------------
+  2 | Groonga is fast full text search engine.
+  3 | PGroonga is a PostgreSQL extension that uses Groonga.
+(2 rows)
+
+DROP TABLE memos;

  Added: sql/text/bitmapscan.sql (+20 -0) 100644
===================================================================
--- /dev/null
+++ sql/text/bitmapscan.sql    2015-01-18 22:58:37 +0900 (d459ec6)
@@ -0,0 +1,20 @@
+CREATE TABLE memos (
+  id integer,
+  content text
+);
+
+INSERT INTO memos VALUES (1, 'PostgreSQL is a RDBMS.');
+INSERT INTO memos VALUES (2, 'Groonga is fast full text search engine.');
+INSERT INTO memos VALUES (3, 'PGroonga is a PostgreSQL extension that uses Groonga.');
+
+CREATE INDEX grnindex ON memos USING pgroonga (content);
+
+SET enable_seqscan = off;
+SET enable_indexscan = off;
+SET enable_bitmapscan = on;
+
+SELECT id, content
+  FROM memos
+ WHERE content %% 'Groonga';
+
+DROP TABLE memos;
-------------- next part --------------
HTML����������������������������...
Download 



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