Hmza
Hmza7mo ago

Index on two fields

startDate: v.string(), endDate: v.string()
.index("by_date_range", ["startDate", "endDate"]);
3 Replies
lee
lee7mo ago
This index allows you to query contiguous ranges of documents in [startDate, endDate] order. This can be useful but might not support all of your queries. What is your query pattern? You can try to write it in Convex and if it compiles then you're good. Or you can describe it with SQL and we can think about how to write equivalent Convex code
lee
lee7mo ago
Databases are Spreadsheets
I want to share my mental model of databases: - Databases are just big spreadsheets - An index is just a view of the spreadsheet sorted by one or mor...
Hmza
HmzaOP7mo ago
thanks lee. was looking for some additional info on querying too. this has it

Did you find this page helpful?