Skip to content
Snippets Groups Projects
Commit 85e7c52b authored by Michael Armbrust's avatar Michael Armbrust
Browse files

[SQL][DOCS] Improve table caching section


Author: Michael Armbrust <michael@databricks.com>

Closes #2434 from marmbrus/patch-1 and squashes the following commits:

67215be [Michael Armbrust] [SQL][DOCS] Improve table caching section

(cherry picked from commit cbf983bb)
Signed-off-by: default avatarMichael Armbrust <michael@databricks.com>
parent 937de93e
No related branches found
No related tags found
No related merge requests found
...@@ -801,12 +801,12 @@ turning on some experimental options. ...@@ -801,12 +801,12 @@ turning on some experimental options.
## Caching Data In Memory ## Caching Data In Memory
Spark SQL can cache tables using an in-memory columnar format by calling `cacheTable("tableName")`. Spark SQL can cache tables using an in-memory columnar format by calling `sqlContext.cacheTable("tableName")`.
Then Spark SQL will scan only required columns and will automatically tune compression to minimize 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. memory usage and GC pressure. You can call `sqlContext.uncacheTable("tableName")` to remove the table from memory.
Note that if you call `cache` rather than `cacheTable`, tables will _not_ be cached using Note that if you call `schemaRDD.cache()` rather than `sqlContext.cacheTable(...)`, tables will _not_ be cached using
the in-memory columnar format, and therefore `cacheTable` is strongly recommended for this use case. the in-memory columnar format, and therefore `sqlContext.cacheTable(...)` is strongly recommended for this use case.
Configuration of in-memory caching can be done using the `setConf` method on SQLContext or by running Configuration of in-memory caching can be done using the `setConf` method on SQLContext or by running
`SET key=value` commands using SQL. `SET key=value` commands using SQL.
......
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