diff options
author | Michael Armbrust <michael@databricks.com> | 2014-09-17 12:41:49 -0700 |
---|---|---|
committer | Michael Armbrust <michael@databricks.com> | 2014-09-17 12:41:49 -0700 |
commit | cbf983bb4a550ff26756ed7308fb03db42cffcff (patch) | |
tree | b4f4875d8e83da6889f371d64d0eb96c3d4328a0 /docs | |
parent | 8fbd5f4a90f92e064aa057adbd3f8c58dd0087fa (diff) | |
download | spark-cbf983bb4a550ff26756ed7308fb03db42cffcff.tar.gz spark-cbf983bb4a550ff26756ed7308fb03db42cffcff.tar.bz2 spark-cbf983bb4a550ff26756ed7308fb03db42cffcff.zip |
[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
Diffstat (limited to 'docs')
-rw-r--r-- | docs/sql-programming-guide.md | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/docs/sql-programming-guide.md b/docs/sql-programming-guide.md index c498b41c43..5212e19c41 100644 --- a/docs/sql-programming-guide.md +++ b/docs/sql-programming-guide.md @@ -801,12 +801,12 @@ turning on some experimental options. ## 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 -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 -the in-memory columnar format, and therefore `cacheTable` is strongly recommended for this use case. +Note that if you call `schemaRDD.cache()` rather than `sqlContext.cacheTable(...)`, tables will _not_ be cached using +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 `SET key=value` commands using SQL. |