Verifying Index Usage
Verify single-value JSON index, multivalue JSON index, and JSON search index usage by examining the query execution plan for the index name and access method.
Faster response time can be a useful hint, but it is not reliable proof, especially in development environments or with small data sets where full scans can still be fast. Examine the execution plan to confirm index usage.
Verify Index Usage with EXPLAIN PLAN
Explain a query that uses a JSON_EXISTS predicate with an IN list.
EXPLAIN PLAN FOR
SELECT data
FROM bookings
WHERE JSON_EXISTS(data,
'$?(@.reservations[*].confirmationNumber.string()
in ("FGU89A", "FGU89B", "FGU89C"))');
Display the execution plan.
SELECT * FROM TABLE(DBMS_XPLAN.DISPLAY(format => 'ALL'));
Plan Table Output

The INDEX RANGE SCAN (MULTI VALUE) operation on CONFIRMATIONNO_IDX confirms that the multivalue index was used. INLIST ITERATOR shows that Oracle expands the IN list into multiple index lookups. TABLE ACCESS BY INDEX ROWID BATCHED indicates that rowids returned from the index are used to fetch the full JSON documents.
If the index is not used, the plan typically shows a full table scan and does not include the index name. Verify that the query uses the same path expression and data type as the index definition.
Verify JSON Search Index Usage
Assume that bookings_search_idx has been created as described in JSON Search Index for Ad Hoc Queries and Full-Text Search.
Explain a query that checks whether a traveler phone number exists:
EXPLAIN PLAN FOR
SELECT data
FROM bookings
WHERE JSON_EXISTS(data, '$.traveler.phone');
Display the execution plan:
SELECT * FROM TABLE(DBMS_XPLAN.DISPLAY(format => 'ALL'));
When Oracle uses the JSON search index, the execution plan includes a DOMAIN INDEX operation and the search-index name. The following plan fragment illustrates the expected indication; the actual plan text can vary by query and optimizer choices:
|* 2| DOMAIN INDEX | BOOKINGS_SEARCH_IDX | | | 4 (0)
If the actual plan shows TABLE ACCESS FULL and does not list BOOKINGS_SEARCH_IDX, the JSON search index was not used.
EXPLAIN PLAN When a Query Does Not Match the Indexed Path
The following index is defined on $.traveler.email.
DROP INDEX email_idx;
CREATE INDEX email_idx ON bookings b
(json_value(data, '$.traveler.email.string()'
ERROR ON ERROR NULL ON EMPTY));
Explain the plan for a query that uses a different path, so the index is not used.
EXPLAIN PLAN FOR
SELECT data
FROM bookings
WHERE JSON_VALUE(data, '$.traveler.emailAddress') = 'jane.doe@example.com';
Display the plan.
SELECT * FROM TABLE(DBMS_XPLAN.DISPLAY(format => 'ALL'));
Plan Table Output: No Index Usage

The plan shows a full table scan, TABLE ACCESS FULL, and does not list EMAIL_IDX, the created index. This confirms that the index is not used because the query path does not match the indexed path.