1CREATE TABLE memos (
2  id integer,
3  content text
4);
5
6INSERT INTO memos VALUES (1, 'PostgreSQL is a RDBMS');
7INSERT INTO memos VALUES (2, 'Groonga is fast full text search engine');
8INSERT INTO memos VALUES (3, 'PGroonga is a PostgreSQL extension that uses Groonga');
9INSERT INTO memos VALUES (4, 'groonga command is provided');
10
11CREATE INDEX grnindex ON memos USING pgroonga (content pgroonga_text_regexp_ops);
12
13SET enable_seqscan = off;
14SET enable_indexscan = on;
15SET enable_bitmapscan = off;
16
17SELECT id, content
18  FROM memos
19 WHERE content LIKE '%Groonga';
20
21DROP TABLE memos;
22