SQL Engine - Query Rewrite

1 - About

The query rewrite is a feature of the RDBMS Modeling - (Materialized|Aggregate) (View|Table) capabilities.

The real power behind aggregate table and query rewrite is that their use is transparent to the user. In the same way that a user doesn’t have to know about the indexes on a table to use them, then likewise, a user doesn’t have to know about the presence, structure and content of the materialized view. Query Rewrite enables this transparent use of aggregate table and is a query optimisation mechanism whereby the original query SQL, which is written against the base tables, is automatically rewritten by the optimiser to access the appropriate materialized views.

3 - About

Normally, when QUERY REWRITE ENABLED is set to FALSE, the database will take your SQL as is, parse it, and optimize it. With query rewrites enabled, The database will insert an extra step into this process (For Oracle, the query transformer do the job). After parsing, it will attempt to rewrite the query to access some RDBMS Modeling - (Materialized|Aggregate) (View|Table), instead of the actual table that it references. If it can perform a query rewrite, the rewritten query (or queries) is parsed and then optimized along with the original query. The query plan with the lowest cost from this set is chosen for execution. If it cannot rewrite the query, the original parsed query is optimized and executed as normal.

  • Bookmark "SQL Engine - Query Rewrite" at del.icio.us
  • Bookmark "SQL Engine - Query Rewrite" at Digg
  • Bookmark "SQL Engine - Query Rewrite" at Ask
  • Bookmark "SQL Engine - Query Rewrite" at Google
  • Bookmark "SQL Engine - Query Rewrite" at StumbleUpon
  • Bookmark "SQL Engine - Query Rewrite" at Technorati
  • Bookmark "SQL Engine - Query Rewrite" at Live Bookmarks
  • Bookmark "SQL Engine - Query Rewrite" at Yahoo! Myweb
  • Bookmark "SQL Engine - Query Rewrite" at Facebook
  • Bookmark "SQL Engine - Query Rewrite" at Yahoo! Bookmarks
  • Bookmark "SQL Engine - Query Rewrite" at Twitter
  • Bookmark "SQL Engine - Query Rewrite" at myAOL
relation/engine/query_rewrite.txt · Last modified: 2017/06/20 11:11 by gerardnico