TnxTable is a direct cursor into the table. "Setting a range" has no other effect than limiting the navigation on the index to a specific subset. No additional resources are needed.

Using a query would require to parse the query sting, build a tree of evaluation objects, acquire cursor handles on all source tables, execute the evaluation tree using the cursor handles to read the source data which builds a result set (a result set is conceptionally an unnamed, indexless, in-memory table) and return a cursor handle for this result set.

From an architectural perspective, TnxDataset is a wrapper around a cursor handle. In case of a TnxTable that cursor handle is a direct cursor into a table. In case of a TnxQuery that cursor handle belongs to a unnamed, indexless in-memory table which was created and populated during query evaluation. The SQL engine uses direct cursors into tables internally to evaluate the query expression.

Having Table access as well as Query access is one the great benefits of NexusDB over the pure SQL  database engines.

Always try using "the right tool for the job". There are cases where SQL is that right tool but there are also many cases when more direct navigational / cursor-based access is "the right tool". NexusDB has always been designed to give you the best of both worlds in a fast, stable, scalable and dependable package.

Home | Site Contents | Documentation | FAQ, Tips & Tricks | NexusDB FAQ | Table based access