请输入您要查询的百科知识:

 

词条 Query Rewriting
释义

  1. References

{{Multiple issues|{{Underlinked|date=January 2019}}{{Orphan|date=August 2014}}
}}

Query Rewriting is a typically automatic transformation that takes a set of database tables, views and/or queries, usually indices, often gathered data and query statistics, and other metadata, and yields a set of different queries, which produce the same results but execute with better performance (for example, faster, or with lower memory use).[1] Query rewriting can be based on relational algebra or an extension thereof (e.g. multiset relational algebra with sorting, aggregation and three-valued predicates i.e. NULLs as in the case of SQL). The equivalence rules of relational algebra are exploited, in other words, different query structures and orderings can be mathematically proven to yield the same result. For example, filtering on fields A and B, or cross joining R and S can be done in any order, but there can be a performance difference. Multiple operations may be combined, and operation orders may be altered.

The result of query rewriting may not be at the same abstraction level or API as the original set of queries (though often is). For example, the input queries may be in relational algebra or SQL, and the rewritten queries may be closer to the physical representation of the data, e.g. array operations. Query rewriting can also involve materialization of views and other subqueries; operations that may or may not be available to the API user. The query rewriting transformation can be [https://www.ibm.com/support/knowledgecenter/en/SSEPGG_10.1.0/com.ibm.db2.luw.admin.perf.doc/doc/c0024525.html aided by] creating indices from which the optimizer can choose (some database systems create their own indexes if deemed useful), mandating the use of specific indices, creating materialized and/or denormalized views, or helping a database system gather statistics on the data and query use, as the optimality depends on patterns in data and typical query usage.

Query rewriting may be rule based or optimizer based. [https://info.teradata.com/htmlpubs/DB_TTU_16_00/index.html#page/SQL_Reference/B035-1142-160K/use1472241592668.html Some] sources discuss query rewriting as a distinct step prior to optimization, operating at the level of the user accessible algebra API (e.g. SQL).

There are other, largely unrelated concepts also named similarly, for example, [https://hughewilliams.com/2012/03/19/query-rewriting-in-search-engines/ query rewriting by search engines].

References

1. ^{{Cite book | doi=10.1007/978-0-387-39940-9_863|chapter = Query Rewriting|title = Encyclopedia of Database Systems| pages=2308–2309|year = 2009|last1 = Vassilakopoulos|first1 = Michael| last2=Tzouramanis| first2=Theodoros| last3=Terenziani| first3=Paolo| last4=Patel| first4=Chintan| last5=Weng| first5=Chunhua| last6=Romero| first6=Rafael| last7=Mazón| first7=Jose-Norberto| last8=Trujillo| first8=Juan| last9=Serrano| first9=Manuel| last10=Piattini| first10=Mario| last11=Buragohain| first11=Chiranjeeb| last12=Suri| first12=Subhash| last13=Zhu| first13=Xingquan| last14=Risch| first14=Tore| last15=Bu| first15=Yingyi| last16=Chi-Wing Wong| first16=Raymond| last17=Fu| first17=Ada Wai-Chee| last18=Chirkova| first18=Rada| last19=Gupta| first19=Amarnath| last20=Vechtomova| first20=Olga| last21=He| first21=Ben| last22=Risch| first22=Tore| last23=Tata| first23=Sandeep| last24=Patel| first24=Jignesh M.| last25=Lacroix| first25=Zoé| last26=Bouganim| first26=Luc| last27=Pitoura| first27=Evaggelia| last28=Neumann| first28=Thomas| last29=Tan| first29=Kian-Lee| last30=Pitoura| first30=Evaggelia| displayauthors=29| isbn=978-0-387-35544-3}}
{{DEFAULTSORT:Query Rewriting}}

1 : Data management

随便看

 

开放百科全书收录14589846条英语、德语、日语等多语种百科知识,基本涵盖了大多数领域的百科知识,是一部内容自由、开放的电子版国际百科全书。

 

Copyright © 2023 OENC.NET All Rights Reserved
京ICP备2021023879号 更新时间:2024/9/25 18:23:56