Query rewriting (original) (raw)

About DBpedia

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). 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

Property Value
dbo:abstract 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). 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 application programming interface (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 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. 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, query rewriting by search engines. (en)
dbo:wikiPageExternalLink https://www.ibm.com/support/knowledgecenter/en/SSEPGG_10.1.0/com.ibm.db2.luw.admin.perf.doc/doc/c0024525.html
dbo:wikiPageID 43435003 (xsd:integer)
dbo:wikiPageLength 4198 (xsd:nonNegativeInteger)
dbo:wikiPageRevisionID 1121168573 (xsd:integer)
dbo:wikiPageWikiLink dbr:Query_language dbr:Relational_algebra dbr:SQL dbr:Application_programming_interface dbr:Database_index dbr:Query_optimization dbr:Database dbr:Logical_equivalence dbc:Data_management dbr:Metadata dbr:Materialized_view dbr:View_(SQL) dbr:Search_engines dbr:Query_structure dbr:Abstraction_level
dbp:wikiPageUsesTemplate dbt:Citation_needed dbt:Databases
dct:subject dbc:Data_management
rdfs:comment 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). 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 (en)
rdfs:label Query rewriting (en)
owl:sameAs wikidata:Query rewriting https://global.dbpedia.org/id/h4ny
prov:wasDerivedFrom wikipedia-en:Query_rewriting?oldid=1121168573&ns=0
foaf:isPrimaryTopicOf wikipedia-en:Query_rewriting
is dbo:wikiPageRedirects of dbr:Query_Rewriting
is dbo:wikiPageWikiLink of dbr:Query_Rewriting dbr:Query_optimization
is foaf:primaryTopic of wikipedia-en:Query_rewriting