20f45a7c1c
The index for message was fairly inefficient as it was only using the cursor, as it was referring to the old `chat_id` field. This meant that newer messages would be fetched much faster then older messages. The index has been changed so that now it includes `local_chat_id` (which is currently used for filtering), and not using `hide`. The reason being is that `hide` is a low cardinality index, so there's no performance benefit to have it in, also it's mostly ignored by the query planner. This commit also adds the missing migrations, we generated the file, but the source was missing, probably I forgot to add them in a rebase. They have been generated from the migration file, using `RestoreAsset`. |
||
---|---|---|
.. | ||
000001_init.down.db.sql | ||
000001_init.up.db.sql | ||
000002_add_last_ens_clock_value.down.sql | ||
000002_add_last_ens_clock_value.up.sql | ||
1586358095_add_replace.down.sql | ||
1586358095_add_replace.up.sql | ||
1588665364_add_image_data.down.sql | ||
1588665364_add_image_data.up.sql | ||
1589365189_add_pow_target.down.sql | ||
1589365189_add_pow_target.up.sql | ||
1591277220_add_index_messages.down.sql | ||
1591277220_add_index_messages.up.sql | ||
doc.go |