summary refs log tree commit diff stats
path: root/generator
diff options
context:
space:
mode:
authorKelly Rauchenberger <fefferburbia@gmail.com>2017-02-13 10:54:41 -0500
committerKelly Rauchenberger <fefferburbia@gmail.com>2017-02-13 10:54:41 -0500
commita354b1f864523e9def80aa1b3a561bce6bdb05ab (patch)
tree8c9b8c9c888f73b5c9cc53aa7d2b1f838ed80c8a /generator
parent88e931e8acbaf41b8d36e4ae00b06764793a1441 (diff)
downloadverbly-a354b1f864523e9def80aa1b3a561bce6bdb05ab.tar.gz
verbly-a354b1f864523e9def80aa1b3a561bce6bdb05ab.tar.bz2
verbly-a354b1f864523e9def80aa1b3a561bce6bdb05ab.zip
Tweaked database indexes
`rhymes_with` now also contains `prerhyme` so that rhyming joins can be
convering. `notions_lemmas` and `lemmas_notions` have been created so as
to faciliate "jumping" over `words` when it's only needed as a
many-to-many through table. Because `notion_words` and `lemma_words` are
prefixes of these new indexes, they have been removed.
Diffstat (limited to 'generator')
-rw-r--r--generator/schema.sql6
1 files changed, 3 insertions, 3 deletions
diff --git a/generator/schema.sql b/generator/schema.sql index 5b42d52..a49a853 100644 --- a/generator/schema.sql +++ b/generator/schema.sql
@@ -92,8 +92,8 @@ CREATE TABLE `words` (
92 `group_id` INTEGER 92 `group_id` INTEGER
93); 93);
94 94
95CREATE INDEX `notion_words` ON `words`(`notion_id`); 95CREATE INDEX `notions_lemmas` ON `words`(`notion_id`,`lemma_id`);
96CREATE INDEX `lemma_words` ON `words`(`lemma_id`); 96CREATE INDEX `lemmas_notions` ON `words`(`lemma_id`,`notion_id`);
97CREATE INDEX `group_words` ON `words`(`group_id`); 97CREATE INDEX `group_words` ON `words`(`group_id`);
98 98
99CREATE TABLE `antonymy` ( 99CREATE TABLE `antonymy` (
@@ -178,7 +178,7 @@ CREATE TABLE `pronunciations` (
178 `stress` VARCHAR(64) NOT NULL 178 `stress` VARCHAR(64) NOT NULL
179); 179);
180 180
181CREATE INDEX `rhymes_with` ON `pronunciations`(`rhyme`); 181CREATE INDEX `rhymes_with` ON `pronunciations`(`rhyme`,`prerhyme`);
182 182
183CREATE TABLE `forms_pronunciations` ( 183CREATE TABLE `forms_pronunciations` (
184 `form_id` INTEGER NOT NULL, 184 `form_id` INTEGER NOT NULL,