-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Support prefix RK search by '&^~' with prefix_search_ops_v2
- Loading branch information
Showing
11 changed files
with
376 additions
and
49 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,23 @@ | ||
CREATE TABLE readings ( | ||
katakana text | ||
); | ||
INSERT INTO readings VALUES ('ポストグレスキューエル'); | ||
INSERT INTO readings VALUES ('グルンガ'); | ||
INSERT INTO readings VALUES ('ピージールンガ'); | ||
INSERT INTO readings VALUES ('ピージーロジカル'); | ||
CREATE INDEX pgrn_index ON readings | ||
USING pgroonga (katakana pgroonga.prefix_search_ops_v2); | ||
SET enable_seqscan = off; | ||
SET enable_indexscan = off; | ||
SET enable_bitmapscan = on; | ||
SELECT katakana | ||
FROM readings | ||
WHERE katakana &^~ 'p'; | ||
katakana | ||
------------------------ | ||
ポストグレスキューエル | ||
ピージールンガ | ||
ピージーロジカル | ||
(3 rows) | ||
|
||
DROP TABLE readings; |
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,23 @@ | ||
CREATE TABLE readings ( | ||
katakana text | ||
); | ||
INSERT INTO readings VALUES ('ポストグレスキューエル'); | ||
INSERT INTO readings VALUES ('グルンガ'); | ||
INSERT INTO readings VALUES ('ピージールンガ'); | ||
INSERT INTO readings VALUES ('ピージーロジカル'); | ||
CREATE INDEX pgrn_index ON readings | ||
USING pgroonga (katakana pgroonga.prefix_search_ops_v2); | ||
SET enable_seqscan = off; | ||
SET enable_indexscan = on; | ||
SET enable_bitmapscan = off; | ||
SELECT katakana | ||
FROM readings | ||
WHERE katakana &^~ 'p'; | ||
katakana | ||
------------------------ | ||
ピージールンガ | ||
ピージーロジカル | ||
ポストグレスキューエル | ||
(3 rows) | ||
|
||
DROP TABLE readings; |
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,21 @@ | ||
CREATE TABLE readings ( | ||
katakana text | ||
); | ||
INSERT INTO readings VALUES ('ポストグレスキューエル'); | ||
INSERT INTO readings VALUES ('グルンガ'); | ||
INSERT INTO readings VALUES ('ピージールンガ'); | ||
INSERT INTO readings VALUES ('ピージーロジカル'); | ||
SET enable_seqscan = on; | ||
SET enable_indexscan = off; | ||
SET enable_bitmapscan = off; | ||
SELECT katakana | ||
FROM readings | ||
WHERE katakana &^~ 'p'; | ||
katakana | ||
------------------------ | ||
ポストグレスキューエル | ||
ピージールンガ | ||
ピージーロジカル | ||
(3 rows) | ||
|
||
DROP TABLE readings; |
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,21 @@ | ||
CREATE TABLE readings ( | ||
katakana text | ||
); | ||
|
||
INSERT INTO readings VALUES ('ポストグレスキューエル'); | ||
INSERT INTO readings VALUES ('グルンガ'); | ||
INSERT INTO readings VALUES ('ピージールンガ'); | ||
INSERT INTO readings VALUES ('ピージーロジカル'); | ||
|
||
CREATE INDEX pgrn_index ON readings | ||
USING pgroonga (katakana pgroonga.prefix_search_ops_v2); | ||
|
||
SET enable_seqscan = off; | ||
SET enable_indexscan = off; | ||
SET enable_bitmapscan = on; | ||
|
||
SELECT katakana | ||
FROM readings | ||
WHERE katakana &^~ 'p'; | ||
|
||
DROP TABLE readings; |
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,21 @@ | ||
CREATE TABLE readings ( | ||
katakana text | ||
); | ||
|
||
INSERT INTO readings VALUES ('ポストグレスキューエル'); | ||
INSERT INTO readings VALUES ('グルンガ'); | ||
INSERT INTO readings VALUES ('ピージールンガ'); | ||
INSERT INTO readings VALUES ('ピージーロジカル'); | ||
|
||
CREATE INDEX pgrn_index ON readings | ||
USING pgroonga (katakana pgroonga.prefix_search_ops_v2); | ||
|
||
SET enable_seqscan = off; | ||
SET enable_indexscan = on; | ||
SET enable_bitmapscan = off; | ||
|
||
SELECT katakana | ||
FROM readings | ||
WHERE katakana &^~ 'p'; | ||
|
||
DROP TABLE readings; |
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,18 @@ | ||
CREATE TABLE readings ( | ||
katakana text | ||
); | ||
|
||
INSERT INTO readings VALUES ('ポストグレスキューエル'); | ||
INSERT INTO readings VALUES ('グルンガ'); | ||
INSERT INTO readings VALUES ('ピージールンガ'); | ||
INSERT INTO readings VALUES ('ピージーロジカル'); | ||
|
||
SET enable_seqscan = on; | ||
SET enable_indexscan = off; | ||
SET enable_bitmapscan = off; | ||
|
||
SELECT katakana | ||
FROM readings | ||
WHERE katakana &^~ 'p'; | ||
|
||
DROP TABLE readings; |
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.