SHOW CACHED TABLES

Description

The SHOW CACHED TABLES statement returns every in-memory cache entry that was registered with an explicit table or view name, for example via CACHE TABLE or spark.catalog.cacheTable. The result has two columns: tableName (the name used when caching) and storageLevel (a string description of how the data is cached).

Relations cached only through Dataset.cache() / DataFrame.cache() without assigning a catalog name are not listed.

Syntax

SHOW CACHED TABLES

Examples

CACHE TABLE my_table AS SELECT * FROM src;

SHOW CACHED TABLES;
+----------+--------------------------------------+
| tableName|                          storageLevel|
+----------+--------------------------------------+
|  my_table|Disk Memory Deserialized 1x Replicated|
+----------+--------------------------------------+