Implement a hash-based indexing option for attributes #82
Labels
No labels
A-build
A-cli
A-core
A-design
A-edn
A-ffi
A-query
A-sdk
A-sdk-android
A-sdk-ios
A-sync
A-transact
A-views
A-vocab
P-Android
P-desktop
P-iOS
bug
correctness
dependencies
dev-ergonomics
discussion
documentation
duplicate
enhancement
enquiry
good first bug
good first issue
help wanted
hygiene
in progress
invalid
question
ready
size
speed
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: greg/mentat#82
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Our schema language supports
:index true
, which we interpret as a SQL index onvaet
.For strings, that's inefficient: firstly we get duplication of string content, which is space-expensive, but we're also comparing strings rather than primitive values.
Bug 889561 removed the URL unique index in Places, replacing it with a
url_hash
column that's queried first. The hash is computed by mfbt'sAddToHash
, which goes a lil' something like this:Because we can find
ea->v
fromdatoms
, we can support indexed lookup fromv->eat
by defining a separate materialized view,heat
(direct index, but collision avoidance needed) orhi
(relying on an easy indexed join againstdatoms
), for values that are indexed only for direct lookup and not for range queries.This is also particularly useful for
fulltext_values
: the FTS virtual table requires a table scan to look up exact values, which makes insertion slow.