apache / doris

Apache Doris is an easy-to-use, high performance and unified analytics database.
https://doris.apache.org
Apache License 2.0
12.36k stars 3.22k forks source link

Add cache system to enhance query speed #5177

Open zhaojintaozhao opened 3 years ago

zhaojintaozhao commented 3 years ago

In Big Data analytics systems, there may be many repeated query sqls. Doris generates a query plan for each sql,and call BE and return the query result。These repeated query sqls costs many resources,but return same results.

Therefore, Doris can add a cache system to save the query SQL and the result of the SQL statement. If analytics system call the same query next time , the query result is directly returned from the cache to avoid excessive doris query consumption.

After a database is deleted, a table is deleted, the table schema is changed, or loaded new data to a table, the corresponding query cache becomes invalid.

This feature greatly enhance the query speed in scenarios where there are may repeated queries.

francisoliverlee commented 3 years ago

@zhaojintaozhao the lastest version has some cache strategies. doc: cache doc.