touch() function loads a table from disk to memory. Useful for triggering
a "hot" start from conditions where data may be "cold", such as after a restart
or any condition which caused disk cache to flush. A "hot" start provides the
usual fast and expected query performance, as no caching or movement from disk
to memory is required prior to an initial query.
Wraps a SQL statement.
object representing index state.
See the Index documentation for more information on how the above values are determined.
Consider a table with an indexed symbol column:
touch() to "warm up" the table:
On success, an object is returned with the state of the index.
Many people use scripts to restart QuestDB.
touch() after startup via the REST API:
All subsequent queries will be within performance expectations, without additional latency added for "warming up" the data. Touch simulates a query without transferring data over the network, apart from the object as confirmation.