JSON1 Query Engine
The JSON1 Query Engine was introduced in JourneyApps Container v4.37.
The JSON1 Query Engine is a rewrite of the query engine implementation in the container. It affects how indexes are stored, and how queries are performed.
The new query engine has many advantages:
- Up to 8x faster queries than before when no index is used, and 1.5x when an index is already used. Note that indexes will still speed up the query significantly, but slightly less than before.
- Less storage overhead when adding indexes, making initial sync faster.
- Uses the indexes for more types of queries.
Note that performance will not improve noticeably when:
- A query returns all or most objects of a model (no filtering).
- The overhead is in rendering instead of in the database query (e.g. when displaying a thousands of objects in an
- Queries have already been optimized with good indexes.
In this mode, queries will be slower than before. In this mode, both the previous and the new query engine is used for each query, and the results compared. If there is a mismatch, an error is raised.
This is useful for testing the feature on an app, but don't enable this for any production deployments.
In the container, we use SQLite as the underlying database engine. However, to enable our sync system as well as data model changes without complex migration scripts, we store all fields as JSON in the table.