mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-27 01:51:59 +00:00
Cosmetics
This commit is contained in:
parent
d7d3f61c73
commit
27fe7ebd93
@ -7,9 +7,8 @@ title: "Query Result Cache [experimental]"
|
|||||||
|
|
||||||
# Query Result Cache [experimental]
|
# Query Result Cache [experimental]
|
||||||
|
|
||||||
The (experimental) query result cache allows to compute SELECT queries just once and to serve further executions of the same query
|
The query result cache allows to compute SELECT queries just once and to serve further executions of the same query immediately from the
|
||||||
immediately from the cache. Depending on the type of the queries, this can dramatically reduce latency and resource consumption of the
|
cache. Depending on the type of the queries, this can dramatically reduce latency and resource consumption of the ClickHouse server.
|
||||||
ClickHouse server.
|
|
||||||
|
|
||||||
## Background, Design and Limitations
|
## Background, Design and Limitations
|
||||||
|
|
||||||
@ -31,6 +30,11 @@ Transactionally inconsistent caching is traditionally provided by client tools o
|
|||||||
the same caching logic and configuration is often duplicated. With ClickHouse's query result cache, the caching logic moves to the server
|
the same caching logic and configuration is often duplicated. With ClickHouse's query result cache, the caching logic moves to the server
|
||||||
side. This reduces maintenance effort and avoids redundancy.
|
side. This reduces maintenance effort and avoids redundancy.
|
||||||
|
|
||||||
|
:::warning
|
||||||
|
This is an experimental feature that should not be used in production. There are known cases (e.g. in distributed query processing) where
|
||||||
|
wrong results are cached/stored.
|
||||||
|
:::
|
||||||
|
|
||||||
## Usage Examples and Configuration Settings
|
## Usage Examples and Configuration Settings
|
||||||
|
|
||||||
The query/user/profile-level parameter [enable_experimental_query_result_cache](settings/settings.md#enable-experimental-query-result-cache)
|
The query/user/profile-level parameter [enable_experimental_query_result_cache](settings/settings.md#enable-experimental-query-result-cache)
|
||||||
|
@ -120,7 +120,7 @@ public:
|
|||||||
friend class QueryResultCache; /// for createWriter()
|
friend class QueryResultCache; /// for createWriter()
|
||||||
};
|
};
|
||||||
|
|
||||||
/// Looks up a result chunk for a key in the cache and (if found) constructs a pipe with the chunk as source.
|
/// Looks up a query result for a key in the cache and (if found) constructs a pipe with the query result chunks as source.
|
||||||
class Reader
|
class Reader
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
@ -19,7 +19,7 @@ protected:
|
|||||||
Chunk generate() override;
|
Chunk generate() override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
SourceFromChunks(Block header, std::shared_ptr<Chunks> chunks_, bool move_from_chunks);
|
SourceFromChunks(Block header, std::shared_ptr<Chunks> chunks_, bool move_from_chunks_);
|
||||||
|
|
||||||
const std::shared_ptr<Chunks> chunks;
|
const std::shared_ptr<Chunks> chunks;
|
||||||
Chunks::iterator it;
|
Chunks::iterator it;
|
||||||
|
Loading…
Reference in New Issue
Block a user