Share via


Catalog.CacheTable(String) Method

Definition

Caches the specified table in-memory.

Spark SQL can cache tables using an in-memory columnar format by calling CacheTable("tableName") or DataFrame.Cache(). Spark SQL will scan only required columns and will automatically tune compression to minimize memory usage and GC pressure. You can call UncacheTable("tableName") to remove the table from memory.

public void CacheTable (string tableName);
member this.CacheTable : string -> unit
Public Sub CacheTable (tableName As String)

Parameters

tableName
String

Is either a qualified or unqualified name that designates a table. If no database identifier is provided, it refers to a table in the current database.

Applies to