diff options
author | Kelly Rauchenberger <fefferburbia@gmail.com> | 2017-02-13 10:54:41 -0500 |
---|---|---|
committer | Kelly Rauchenberger <fefferburbia@gmail.com> | 2017-02-13 10:54:41 -0500 |
commit | a354b1f864523e9def80aa1b3a561bce6bdb05ab (patch) | |
tree | 8c9b8c9c888f73b5c9cc53aa7d2b1f838ed80c8a | |
parent | 88e931e8acbaf41b8d36e4ae00b06764793a1441 (diff) | |
download | verbly-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.
-rw-r--r-- | generator/schema.sql | 6 |
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 | ||
95 | CREATE INDEX `notion_words` ON `words`(`notion_id`); | 95 | CREATE INDEX `notions_lemmas` ON `words`(`notion_id`,`lemma_id`); |
96 | CREATE INDEX `lemma_words` ON `words`(`lemma_id`); | 96 | CREATE INDEX `lemmas_notions` ON `words`(`lemma_id`,`notion_id`); |
97 | CREATE INDEX `group_words` ON `words`(`group_id`); | 97 | CREATE INDEX `group_words` ON `words`(`group_id`); |
98 | 98 | ||
99 | CREATE TABLE `antonymy` ( | 99 | CREATE 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 | ||
181 | CREATE INDEX `rhymes_with` ON `pronunciations`(`rhyme`); | 181 | CREATE INDEX `rhymes_with` ON `pronunciations`(`rhyme`,`prerhyme`); |
182 | 182 | ||
183 | CREATE TABLE `forms_pronunciations` ( | 183 | CREATE TABLE `forms_pronunciations` ( |
184 | `form_id` INTEGER NOT NULL, | 184 | `form_id` INTEGER NOT NULL, |