[Oracle] [Performance] make the best use to improve query performance Materialized View # 3 Query Rewrite

[Oracle] [Performance] make the best use to improve query performance Materialized View # 3 Query Rewrite


Early no query rewrite technology, DBACreate relay table to improve front-end query performance, but also need to modify the front-end program related Sql statement (led by a launch body)

Can be quite troublesome, if the demand is less just fine, but large, then I think that DBA should work no one will want to do (something more responsibility for less money - big> <).

This will look at improving Oracle query rewriete technology offers (MSSQL2005 / 2008 also has applications)

Article are his own opinion, if wrong please advise

Overview

When conventional Materialized views are used to satisfy the request, the query optimizer can automatically identify, will immediately re-write request. Query directly to the materialized view, without knowing the details, so that system performance is improved.

Oracle now issuing another query rewrite capability, it will usually related queries re-written twice directory, for example, if someone uses an incorrect query mode uses statement does not exist, Oracle SQL optimizer will automatically detect this situation. At the same time it will be at a faster rate to replace the original SQL query SQL.

Cost-Based Query Rewrite Process

image

Example1:

image

Example2:

image

Example3:

image

Related parameter settings

query_rewrite_enabled=true

query_rewrite_integrity= STALE_TOLERATED

The next brother MV simple application related features

Original: Large column  [Oracle] [Performance] make the best use to improve query performance Materialized View # 3 Query Rewrite


Guess you like

Origin www.cnblogs.com/chinatrump/p/11491052.html