-
Notifications
You must be signed in to change notification settings - Fork 15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add created_at query plan #26
Comments
Closed
3 tasks
jb55
added a commit
to damus-io/damus
that referenced
this issue
Apr 4, 2024
This introduces the basic created_at query plan. We scan the created_at + id index in descending order looking for items that match a filter. This is a very general query plan, but might not be very efficient for anything other than local timelines. Changelog-Added: Add general created_at query plan for timelines Closes: damus-io/nostrdb#26 Signed-off-by: William Casarin <jb55@jb55.com>
jb55
added a commit
to damus-io/damus
that referenced
this issue
Apr 4, 2024
This introduces the basic created_at query plan. We scan the created_at + id index in descending order looking for items that match a filter. This is a very general query plan, but might not be very efficient for anything other than local timelines. Changelog-Added: Add general created_at query plan for timelines Closes: damus-io/nostrdb#26 Signed-off-by: William Casarin <jb55@jb55.com>
jb55
added a commit
to damus-io/damus
that referenced
this issue
Apr 25, 2024
This introduces the basic created_at query plan. We scan the created_at + id index in descending order looking for items that match a filter. This is a very general query plan, but might not be very efficient for anything other than local timelines. Changelog-Added: Add general created_at query plan for timelines Closes: damus-io/nostrdb#26 Signed-off-by: William Casarin <jb55@jb55.com>
jb55
added a commit
to damus-io/damus
that referenced
this issue
Apr 25, 2024
This introduces the basic created_at query plan. We scan the created_at + id index in descending order looking for items that match a filter. This is a very general query plan, but might not be very efficient for anything other than local timelines. Changelog-Added: Add general created_at query plan for timelines Closes: damus-io/nostrdb#26 Signed-off-by: William Casarin <jb55@jb55.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
For timeline queries and query fallbacks, the simplest possible query plan is the created_at scan. This works well for timelines in our case, because nostrdb is not typically used as a global database and should contain notes intended for us anyways. This allows us to simplify timeline queries into a linear scan. Since most of our indices are ordered by created_at, this linear scan is pretty efficient for looking for recent notes.
The text was updated successfully, but these errors were encountered: