halkyon/halkyon_learn_server/migrations
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Tizian 「ティツィアーン」 8e3a4e56dc
perf(dictionary): a search finds keys by their first characters, indexed
A search matched LIKE '%|eat%' over every entry's barred keys, which no
index can answer, so each one read the whole dictionary: 43-57 ms in
JMdict's 218,863 entries. dictionary_search_key holds a row per key and
loose key with its first one, two and three characters in columns of
their own and one index on them, so the keys a query starts are an
equality the index answers whatever the database's collation (Serverpod's
models can't declare COLLATE "C" or text_pattern_ops). A search now takes
5-26 ms, at 1.4 million rows and 190 MB for JMdict, and its load takes
72 s instead of 33 s.

The loader fills the table beside the entries and loads a dictionary
again when it has none. Until then, in the minutes after the deploying
server starts, the search reads the barred keys as before; those columns
stay until a later release, since the server before a deploy's switch
still searches them. The migration only creates the table and its index.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Tizian 「ティツィアーン」 <raisondetredev@pm.me>
2026-10-17 19:46:37 +02:00
..
20260916165410927 chore: scaffold the Serverpod 4 build 2026-09-24 15:32:29 +02:00
20260930094729362-studysets feat: step 7's migration, with an index on spaceId 2026-09-30 20:38:15 +02:00
20260930122235111-cards feat(server): cards and their append-only revisions, synced 2026-09-30 20:38:17 +02:00
20260930145136285-reviews feat(server): the review log, synced and append-only 2026-09-30 20:38:19 +02:00
20261001064926911-tree-tags-assets feat: studysets record when they last changed; the library lists them so 2026-10-01 09:59:46 +02:00
20261002035419149-file-allowance Limit how much room people's files take 2026-10-02 06:02:15 +02:00
20261002191122122-notes feat: notes in studysets, synced and merged as cards are, with tags 2026-10-02 21:53:56 +02:00
20261002211346701-learning-paths feat: learning paths in studysets, synced, with progress and tags 2026-10-02 23:31:20 +02:00
20261003110855698-pdf-sources feat: PDF sources: read, take notes and cards from pages, deadlines 2026-10-03 14:40:08 +02:00
20261007205440868-card-buried-at perf: keep a card's burial on its row rather than in the review log 2026-10-09 18:09:17 +02:00
20261008165051407-pdf-position feat: files in an order of one's own, with Reorder beside the tabs 2026-10-09 18:09:22 +02:00
20261008223835206-dictionaries feat(server): dictionaries, loaded from files and searched 2026-10-09 18:09:25 +02:00
20261009123850448-dictionary-kind feat: dictionaries hold words or characters, and are asked by their source 2026-10-09 18:09:32 +02:00
20261009145434785-dictionary-entry-version feat: a dictionary's corrections reach the cards made from it, by offer 2026-10-09 18:09:37 +02:00
20261009184924904-public-profiles feat: public profiles, a handle on the account domain with name, bio, links and picture 2026-10-10 09:46:37 +02:00
20261009195137836-published-studysets feat(publish): releases in git (public tier, stage 2) 2026-10-10 09:46:38 +02:00
20261009202105673-explore feat(explore): list published studysets, give out their releases, withdraw 2026-10-10 09:46:39 +02:00
20261009215552429-learner-count feat(explore): how many learn it here, opt-in; copies published within their licence 2026-10-10 09:46:41 +02:00
20261009220324372-based-on feat(explore): how many learn it here, opt-in; copies published within their licence 2026-10-10 09:46:41 +02:00
20261009224606274-feedback feat(feedback): reports and suggestions on published studysets, gathered by the instance 2026-10-10 09:46:42 +02:00
20261010095547719-assistant-connector feat(assistant): Claude reads studysets through a connector on the instance 2026-10-10 15:11:17 +02:00
20261012162411835-studyset-deleted-at feat(studyset): deleted studysets wait 14 days in Recently deleted 2026-10-13 21:21:43 +02:00
20261013035552510-dictionary-keys feat(jellyfin): watch from one's own Jellyfin server and learn the words of its subtitles 2026-10-13 21:21:48 +02:00
20261014153932647-release-colour feat(publish): a release keeps its colour, and a description for Explore 2026-10-14 18:23:51 +02:00
20261015171326465-email-sign-in feat(auth): sign in with an email address, keeping only a keyed hash of it 2026-10-17 19:46:28 +02:00
20261015220121195-verified-links feat(profile): profile pages on the account domain, and links verified by rel="me" 2026-10-17 19:46:29 +02:00
20261015220626303-discussions feat(discussions): questions on published studysets, answered by learners 2026-10-17 19:46:32 +02:00
20261017110130653 perf(dictionary): a search finds keys by their first characters, indexed 2026-10-17 19:46:37 +02:00
migration_registry.txt perf(dictionary): a search finds keys by their first characters, indexed 2026-10-17 19:46:37 +02:00