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
11 changed files
with
348 additions
and
14 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,29 @@ | ||
| CREATE TABLE memos ( | ||
| title text, | ||
| contents text[] | ||
| ); | ||
| INSERT INTO memos | ||
| VALUES ('PostgreSQL', | ||
| ARRAY['PostgreSQL is an OSS RDBMS', | ||
| 'PostgreSQL has partial full-text search support']); | ||
| INSERT INTO memos | ||
| VALUES ('Groonga', ARRAY['Groonga is an OSS full-text search engine', | ||
| 'Groonga has full full-text search support']); | ||
| INSERT INTO memos | ||
| VALUES ('PGroonga', | ||
| ARRAY['PGroonga is an OSS PostgreSQL extension', | ||
| 'PGroonga adds full full-text search support based on Groonga to PostgreSQL']); | ||
| CREATE INDEX pgroonga_memos_index ON memos USING pgroonga (contents); | ||
| SET enable_seqscan = off; | ||
| SET enable_indexscan = off; | ||
| SET enable_bitmapscan = on; | ||
| SELECT title, contents | ||
| FROM memos | ||
| WHERE contents @@ 'rdbms OR engine'; | ||
| title | contents | ||
| ------------+------------------------------------------------------------------------------------------- | ||
| PostgreSQL | {"PostgreSQL is an OSS RDBMS","PostgreSQL has partial full-text search support"} | ||
| Groonga | {"Groonga is an OSS full-text search engine","Groonga has full full-text search support"} | ||
| (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,29 @@ | ||
| CREATE TABLE memos ( | ||
| title text, | ||
| contents text[] | ||
| ); | ||
| INSERT INTO memos | ||
| VALUES ('PostgreSQL', | ||
| ARRAY['PostgreSQL is an OSS RDBMS', | ||
| 'PostgreSQL has partial full-text search support']); | ||
| INSERT INTO memos | ||
| VALUES ('Groonga', ARRAY['Groonga is an OSS full-text search engine', | ||
| 'Groonga has full full-text search support']); | ||
| INSERT INTO memos | ||
| VALUES ('PGroonga', | ||
| ARRAY['PGroonga is an OSS PostgreSQL extension', | ||
| 'PGroonga adds full full-text search support based on Groonga to PostgreSQL']); | ||
| CREATE INDEX pgroonga_memos_index ON memos USING pgroonga (contents); | ||
| SET enable_seqscan = off; | ||
| SET enable_indexscan = on; | ||
| SET enable_bitmapscan = off; | ||
| SELECT title, contents | ||
| FROM memos | ||
| WHERE contents @@ 'rdbms OR engine'; | ||
| title | contents | ||
| ------------+------------------------------------------------------------------------------------------- | ||
| PostgreSQL | {"PostgreSQL is an OSS RDBMS","PostgreSQL has partial full-text search support"} | ||
| Groonga | {"Groonga is an OSS full-text search engine","Groonga has full full-text search support"} | ||
| (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,29 @@ | ||
| CREATE TABLE memos ( | ||
| title text, | ||
| contents text[] | ||
| ); | ||
| INSERT INTO memos | ||
| VALUES ('PostgreSQL', | ||
| ARRAY['PostgreSQL is an OSS RDBMS', | ||
| 'PostgreSQL has partial full-text search support']); | ||
| INSERT INTO memos | ||
| VALUES ('Groonga', ARRAY['Groonga is an OSS full-text search engine', | ||
| 'Groonga has full full-text search support']); | ||
| INSERT INTO memos | ||
| VALUES ('PGroonga', | ||
| ARRAY['PGroonga is an OSS PostgreSQL extension', | ||
| 'PGroonga adds full full-text search support based on Groonga to PostgreSQL']); | ||
| CREATE INDEX pgroonga_memos_index ON memos USING pgroonga (contents); | ||
| SET enable_seqscan = on; | ||
| SET enable_indexscan = off; | ||
| SET enable_bitmapscan = off; | ||
| SELECT title, contents | ||
| FROM memos | ||
| WHERE contents @@ 'rdbms OR engine'; | ||
| title | contents | ||
| ------------+------------------------------------------------------------------------------------------- | ||
| PostgreSQL | {"PostgreSQL is an OSS RDBMS","PostgreSQL has partial full-text search support"} | ||
| Groonga | {"Groonga is an OSS full-text search engine","Groonga has full full-text search support"} | ||
| (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 |
|---|---|---|
| @@ -1,3 +1,4 @@ | ||
| SET search_path = "$user",public,pgroonga,pg_catalog; | ||
| CREATE TABLE memos ( | ||
| id integer, | ||
| content text | ||
|
|
||
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
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
Oops, something went wrong.