Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
9 changed files
with
220 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,25 @@ | ||
| CREATE TABLE memos ( | ||
| id integer, | ||
| title text, | ||
| 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 (title, content); | ||
| SET enable_seqscan = off; | ||
| SET enable_indexscan = off; | ||
| SET enable_bitmapscan = on; | ||
| SELECT id, title, content | ||
| FROM memos | ||
| WHERE title %% 'Groonga' OR content %% 'Groonga'; | ||
| id | title | content | ||
| ----+----------+---------------------------------------------- | ||
| 2 | Groonga | is fast full text search engine. | ||
| 3 | PGroonga | is a PostgreSQL extension that uses Groonga. | ||
| (2 rows) | ||
|
|
||
| DROP TABLE memos; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,25 @@ | ||
| CREATE TABLE memos ( | ||
| id integer, | ||
| title text, | ||
| 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 (title, content); | ||
| SET enable_seqscan = off; | ||
| SET enable_indexscan = on; | ||
| SET enable_bitmapscan = off; | ||
| SELECT id, title, content | ||
| FROM memos | ||
| WHERE title %% 'Groonga' OR content %% 'Groonga'; | ||
| id | title | content | ||
| ----+----------+---------------------------------------------- | ||
| 2 | Groonga | is fast full text search engine. | ||
| 3 | PGroonga | is a PostgreSQL extension that uses Groonga. | ||
| (2 rows) | ||
|
|
||
| DROP TABLE memos; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,25 @@ | ||
| CREATE TABLE memos ( | ||
| id integer, | ||
| title text, | ||
| 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 (title, content); | ||
| SET enable_seqscan = on; | ||
| SET enable_indexscan = off; | ||
| SET enable_bitmapscan = off; | ||
| SELECT id, title, content | ||
| FROM memos | ||
| WHERE title %% 'Groonga' OR content %% 'Groonga'; | ||
| id | title | content | ||
| ----+----------+---------------------------------------------- | ||
| 2 | Groonga | is fast full text search engine. | ||
| 3 | PGroonga | is a PostgreSQL extension that uses Groonga. | ||
| (2 rows) | ||
|
|
||
| DROP TABLE memos; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,37 @@ | ||
| CREATE TABLE memos ( | ||
| id integer, | ||
| title text, | ||
| 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 (title, content); | ||
| UPDATE memos | ||
| SET title = 'Mroonga', | ||
| content = 'is a MySQL plugin that uses Groonga.' | ||
| WHERE id = 3; | ||
| SET enable_seqscan = off; | ||
| SET enable_indexscan = on; | ||
| SET enable_bitmapscan = off; | ||
| SELECT id, title, content | ||
| FROM memos | ||
| WHERE title %% 'Groonga' OR content %% 'Groonga'; | ||
| id | title | content | ||
| ----+---------+-------------------------------------- | ||
| 2 | Groonga | is fast full text search engine. | ||
| 3 | Mroonga | is a MySQL plugin that uses Groonga. | ||
| (2 rows) | ||
|
|
||
| SELECT id, title, content | ||
| FROM memos | ||
| WHERE title %% 'Mroonga' AND content %% 'MySQL'; | ||
| id | title | content | ||
| ----+---------+-------------------------------------- | ||
| 3 | Mroonga | is a MySQL plugin that uses Groonga. | ||
| (1 row) | ||
|
|
||
| DROP TABLE memos; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,24 @@ | ||
| CREATE TABLE memos ( | ||
| id integer, | ||
| title text, | ||
| 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 (title, content); | ||
|
|
||
| SET enable_seqscan = off; | ||
| SET enable_indexscan = off; | ||
| SET enable_bitmapscan = on; | ||
|
|
||
| SELECT id, title, content | ||
| FROM memos | ||
| WHERE title %% 'Groonga' OR content %% 'Groonga'; | ||
|
|
||
| DROP TABLE memos; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,24 @@ | ||
| CREATE TABLE memos ( | ||
| id integer, | ||
| title text, | ||
| 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 (title, content); | ||
|
|
||
| SET enable_seqscan = off; | ||
| SET enable_indexscan = on; | ||
| SET enable_bitmapscan = off; | ||
|
|
||
| SELECT id, title, content | ||
| FROM memos | ||
| WHERE title %% 'Groonga' OR content %% 'Groonga'; | ||
|
|
||
| DROP TABLE memos; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,24 @@ | ||
| CREATE TABLE memos ( | ||
| id integer, | ||
| title text, | ||
| 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 (title, content); | ||
|
|
||
| SET enable_seqscan = on; | ||
| SET enable_indexscan = off; | ||
| SET enable_bitmapscan = off; | ||
|
|
||
| SELECT id, title, content | ||
| FROM memos | ||
| WHERE title %% 'Groonga' OR content %% 'Groonga'; | ||
|
|
||
| DROP TABLE memos; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,33 @@ | ||
| CREATE TABLE memos ( | ||
| id integer, | ||
| title text, | ||
| 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 (title, content); | ||
|
|
||
| UPDATE memos | ||
| SET title = 'Mroonga', | ||
| content = 'is a MySQL plugin that uses Groonga.' | ||
| WHERE id = 3; | ||
|
|
||
| SET enable_seqscan = off; | ||
| SET enable_indexscan = on; | ||
| SET enable_bitmapscan = off; | ||
|
|
||
| SELECT id, title, content | ||
| FROM memos | ||
| WHERE title %% 'Groonga' OR content %% 'Groonga'; | ||
|
|
||
| SELECT id, title, content | ||
| FROM memos | ||
| WHERE title %% 'Mroonga' AND content %% 'MySQL'; | ||
|
|
||
| DROP TABLE memos; |