Skip to content
Snippets Groups Projects
Commit c82fe478 authored by CrazyJvm's avatar CrazyJvm Committed by Patrick Wendell
Browse files

[SQL] Documentation: Explain cacheTable command

add the `cacheTable` specification

Author: CrazyJvm <crazyjvm@gmail.com>

Closes #1681 from CrazyJvm/sql-programming-guide-cache and squashes the following commits:

0a231e0 [CrazyJvm] grammar fixes
a04020e [CrazyJvm] modify title to Cached tables
18b6594 [CrazyJvm] fix format
2cbbf58 [CrazyJvm] add cacheTable guide
parent c0b47bad
No related branches found
No related tags found
No related merge requests found
......@@ -769,3 +769,13 @@ To start the Spark SQL CLI, run the following in the Spark directory:
Configuration of Hive is done by placing your `hive-site.xml` file in `conf/`.
You may run `./bin/spark-sql --help` for a complete list of all available
options.
# Cached tables
Spark SQL can cache tables using an in-memory columnar format by calling `cacheTable("tableName")`.
Then 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.
Note that if you just call `cache` rather than `cacheTable`, tables will _not_ be cached in
in-memory columnar format. So we strongly recommend using `cacheTable` whenever you want to
cache tables.
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment