Skip to content
This repository was archived by the owner on Sep 12, 2018. It is now read-only.
This repository was archived by the owner on Sep 12, 2018. It is now read-only.

[tx] Compress flags on insertion and have SQLite expand internally #226

@ncalexan

Description

@ncalexan

In the Clojure implementation, we do a lot of "wide inserts" where we insert 10 columns, 4 of which are bit flags. In the following, index_avet, index_vaet, index_fulltext, and unique_value are bit flags:

INSERT INTO datoms (e, a, v, value_type_tag, tx, index_avet, index_vaet, index_fulltext, unique_value) VALUES (...)

After #214, we'll be inserting into a "to search" table and populating a "search results" table. We could write a single bit field into the "to search" table, coalescing 4 bit flags into 1 bit field, and then have SQLite populate the "search results" table with bit flags. This would reduce the total number of insert statements we have to execute, which should speed everything up.

This ticket tracks trying this and seeing if it's a perf win: it's possible SQLite does this very slowly, or the overhead is negligible, or ...

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions