Add ability to duplicate a JSON field to improve query performance
This is a feature request.
In the .Net world, there is a library called MartenDB which offers similar functionality to MassiveJs for purposes of using PostgreSQL to store and manipulate JSON documents.
One of the features it has is the ability to duplicate a JSON property as a field on the table.
They write:
According to our testing, the single best thing you can do to speed up queries against the JSONB documents is to duplicate a property or field within the JSONB structure as a separate database column on the document table.
It would be great if MassiveJS would let us define duplicate columns for document tables and then use those columns to query against in the findDoc operation.
(I know we can add these manually, of course, and then just use .find() instead of .findDoc(), but it is more cumbersome that way)