Release 5th March 2025
Change Control note --version 2.1.3 (Hilang --version 2.1.9 Hiperspace.SQL --version 2.1.9)
Overview
This release is primarily concerned with performance when used in a server context the volume if data is huge and accessed via Hiperspace.DB
and many CPU-cores are available.
Performance is addressed with greater parallelism (graph Node
and Edge
queries already execute in parallel) and server-side filtering with using SQL queries.
Parallelism
PartitionSpace
and GenerationSpace
have been updated to search each of the child spaces in parallel and collate results to return to a calling space. For very large hiperspaces PartitionSpace
enables Hiperspace.DB
to match the performance of direct/local hiperspaces by executing access in parallel. Hiperspace uses versioning to avoid transaction contention when multiple sessions are accessing a Space, as historical versions of a GenerationSpace
never need to be updated they are opened with read-only option, which obviates the need for rockshare to mediate access to the underlying files.
SQL Queries
Hiperspace is optimized for key or index access to efficiently search hiperspace for elements that match key or key-part criteria.
For the model entity Customer ( Id : Int64 ) { Name : String, ...};
, a client query from c in space.Customers where c.Id == 42' is translated into 'space.Customers.Find (new Customer { Id = 42} )
which in turn is translated into CustomerKeyPath.Get (42)
, which directly fetches the customer from Hiperspace.
For the model
entity Customer ( Id : Int64 ) { Name : String, ... [Accounts : Account ].
segment Account ( Id : Int64 ) { Title : String, ...};
A query from as in space.CustomerAccounts where owner.Id == 42' is translated into 'space.CustomerAccounts.Find (new Account { owner = new Customer { Id = 42} })
which in turn is translated into CustomerAccountKeyPath.Find (42)
retrieving all Accounts that are owned by Customer 42.
For the model
entity Customer ( Id : Int64 ) { Name : String, ...} [ Accounts : Account ( Customer = this ) ];
entity Account ( Id : Int64 ) { Title : String, Customer : Customer, ...};
A query from as in space.Accounts where Customer.Id == 42' is translated into 'space.Accounts.Find (new Account { Customer = new Customer { Id = 42} })
which in turn is translated into AccountCustonerIndex Path.Find (42)
retrieving all Accounts that have a Customer 42, because the Customer extension Accounts : Account ( Customer = this )
causes an index to be created on Account.
If the extension Accounts : Account ( Customer = this )
is omitted, the Account SetSpace
is scanned (with a residual condition Customer.KeyType.Id of 42), but if the query is `from as in space.Accounts where Customer.Id < 42' the criteria is evaluated once the results have been returned - potentially a very large set.
Query
The Query
function allows 'space.Accounts.Query ("SELECT Account.* FROM Accounts WHERE Accounts.Customer.Id < 42") to be used to send the query to a Hiperspace.DB
server where the results will be filtered before return to the client.