| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Codecov Report
@@ Coverage Diff @@
## main #205 +/- ##
==========================================
+ Coverage 97.43% 97.49% +0.06%
==========================================
Files 177 181 +4
Lines 5895 6037 +142
==========================================
+ Hits 5744 5886 +142
Misses 151 151
Continue to review full report at Codecov.
|
Sorry, something went wrong.
|
🚀 Deployed on https://61cae8a090dfde07c76a4093--sqlmodel.netlify.app |
Sorry, something went wrong.
|
📝 Docs preview for commit dd453ba at: https://61cae8f3eaa6703b1dc08de3--sqlmodel.netlify.app |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
✨ Document indexes and make them opt-in
Up to now, SQLModel created indexes for each column by default. This PR changes that to make indexes only opt-in (including the same line change as in #11), and documents indexes, etc.
This PR adds a new section explaining indexes, how they work, and how to enable them for columns.
It also updates all the rest of the docs examples to use indexes accordingly and references to indexes where necessary.
It adds tests for index creation (for the new tutorial source examples) and updates other tests as needed.
The rationale for the previous behavior of having indexes by default was that it's easy for beginners to not know about indexes, not spend the time to learn about them, and get bad reading performance. It was also partly inspired by how ElasticSearch indexes everything by default, but it probably makes more sense there that everything would be intended to be searchable. But I see this approach was not very generalizable as commented here #9 and #11. So I'm reverting that approach here and instead I'm documenting and explaining indexes as best as I could after several days of working on this.