migaku-official / Migaku-Dictionary-Addon

Migaku Dictionary allows users to lookup word definitions, export definitions to their cards in real-time, hear word audio and see word frequency, etc. If you have an issue please report it in the "Issues" tab. Reponses to issues can be slow on GitHub, for faster support consider joining our Discord server through our Patreon page.
GNU General Public License v3.0
64 stars 24 forks source link

Added pragma case_sensitive ON to take advantage of indexes. #57

Closed dmgerman closed 3 years ago

dmgerman commented 3 years ago

The current searches of the dictionary are not using the index at all.

Queries that use LIKE cannot reliably use an index. The queries of the form LIKE "text%" can use it, but only when case sensitive is on. This is not an issue for Japanese.

See https://stackoverflow.com/questions/8584499/sqlite-should-like-searchstr-use-an-index