Cache Table

Important

This documentation has been retired and might not be updated. The product, service, or technology mentioned in this content is no longer supported. See CACHE TABLE.

CACHE [LAZY] TABLE [db_name.]table_name

Cache the contents of the table in memory using the RDD cache. This enables subsequent queries to avoid scanning the original files as much as possible.

LAZY

Cache the table lazily instead of eagerly scanning the entire table.

See Automatic and manual caching for the differences between the RDD cache and the Databricks IO cache.