ParadeDB’s json index accelerates JSON-field filtering and full-text search inside PostgreSQL tables.
ParadeDB eliminates slow sequential scans when you filter or search inside large JSON/JSONB columns.It creates a purpose-built inverted index that PostgreSQL can leverage via normal SQL, giving millisecond response times.
Create an extension if you haven’t: CREATE EXTENSION IF NOT EXISTS paradedb;
Then build the index: CREATE INDEX products_attr_json_idx ON Products USING paradedb_json (attributes);
Optionally add WITH (language='eng', track_nulls=false)
.
Use the @>
containment operator for exact matches or parade.json_match()
for full-text expressions.PostgreSQL’s planner automatically picks the ParadeDB index if it exists.
SELECT * FROM Products WHERE attributes @> '{"color":"red"}';
SELECT * FROM Products WHERE parade.json_match(attributes, $$color = "red" & size = "M"$$);
Yes. Provide a JSON path: CREATE INDEX orders_items_idx ON OrderItems USING paradedb_json ((detail -> 'specs'));
ParadeDB indexes support REINDEX
and VACUUM
like any other PostgreSQL index.Use REINDEX INDEX idx_name;
after bulk deletes to reclaim space.
JSONB
for deterministic ordering.Creating overlapping full-document indexes wastes space; use partial paths.Forgetting to set the proper language option leads to poorer full-text ranking.
If your JSON field is rarely queried or the table is tiny, the overhead is unnecessary; rely on sequential scans instead.
.
Yes. Operators like @>
and @@
automatically leverage the ParadeDB index.
Absolutely. ParadeDB stores both index types in the same extension, enabling hybrid queries with a single planner pass.