Example showing how the database server completes the query
HCL OneDB™ performs several steps when completing a query for collection-derived tables.
When completing a query, the database server performs the steps
shown in this example:
- Scans the parent table to find the row where
parents.id = 1001
This operation is listed as a SEQUENTIAL SCAN in the SET EXPLAIN output that Query plan that uses a collection-derived table shows.
- Reads the value of the collection column called children.
- Scans the single collection and returns the value of name and id to
the application.
This operation is listed as a COLLECTION SCAN in the SET EXPLAIN output that Query plan that uses a collection-derived table shows.