Read about how to optimize sql query using execution plan, The latest news, videos, and discussion topics about how to optimize sql query using execution plan from alibabacloud.com
1) Clear the cache plan first, pay attention to the production environment use this statement with caution!DBCC FREEPROCCACHE2) re-execute the query, system use, etc.3) Find the longest statement time, you may need to perform multiple times to determine the average time, the code is as follows:SELECT creation_time N ' statement compilation time ', Last_execution_time N ' last
on v _ $ sesstat to plustrace; authorization successful. SQL> grant select on v _ $ statname to plustrace; authorization successful. SQL> grant select on v _ $ mystat to plustrace; authorization successful. SQL> grant plustrace to dba with admin option; authorization successful. SQL> grant plustrace to HR; authorizati
Dba_hist_ SQL _plan is an important view for querying the execution plan of oraclesql.
I would like to express my gratitude for the help of elders who have prepared this article.
The applicable oracle database version is oracle 10 Gb or later.
This view is important because one column in this view is not found in the awrsqrpt report. This column is the filter_pre
A.account_number is not NULLand c.account_no like ' 0% 'GROUP BY D.explanation,--Financial institution identification codeC.account_no,--Trading accountA.batchentrydate,--Date of occurrenceC.currencycode,--Currencyc.ccyledgerbalance--System Agency Code
Observation and analysis of its implementation plan, seemingly there is no problem, because Df_acmov_today (200W or so) is emptied every day, no index, full table scan, Nestloops also normal.
However
Article 1: how to optimize slow query SQL statements in MySQL56-Introduction to slow logs: in actual log analysis, there are usually a large number of slow logs, at the same time, there will be a large number of records for the same query. here we need to find the most problematic and optimized log in the actual log an
Oracle 11g how to clear the execution plan of an SQL statement in the share pool, 11 gpool
In the past, if the execution plan was slow due to binding snoop on a 10 Gb database, you wanted to clear the execution
At Oracle 9i or above, Oracle sometimes chooses to convert the B-Tree index to BITMAP for SQL Execution, resulting in an extremely bad execution plan.
The conversion is determined by the hidden parameter _ B _tree_bitmap_plans. If this parameter is set to true, it is converted. Otherwise, no conversion is performed. In
table t;Sql> Flashback table T to before drop;-----Exception Execution PlanSql> select * from t where object_id=19;Execution Plan----------------------------------------------------------Plan Hash value:329240726--------------------------------------------------------------
Three-day Dragon Boat Festival holiday, I learned jruby and groovy. At last I thought groovy was easy to use. Using groovy is a bit like writing basic, and there are no more rules like Java. During development, code is used to describe the execution logic, rather than writing a large number of classes that comply with Java "patterns" to implement certain logic functions.
Groovy gives me the feeling that the
plustrace; authorization successful. SQL> grant select on V _ $ mystat to plustrace; authorization successful. SQL> grant plustrace to DBA with admin option; authorization successful. SQL> grant plustrace to HR; authorization successful. SQL> exit
After authorization, log on to the Oracle common user HR: Open autotrac
How to clear the execution plan of an SQL statement in the share pool in Oracle 11g
In the past, if the execution plan was slow due to binding snoop on Oracle 10 Gb database, you wanted to clear the execution
The next article is to record their own blind spots, but also reveal their own development process (may not be developed, can only be said to be blind). Of course, some blind spots are also in the process of work and exploration slowly some, now also willing to carry forward the dedication of the blog park, to come out and share with you.Open the door and go straight into the question.Have you ever had the same doubts as me when looking at the execution
BackgroundToday, a client suddenly found me and said that my execution plan could not be deleted. Just take a look at it for me.Then throw me an error message.I look at this mistake, I feel puzzled,,, this is the connection is not a database instance .... It seems to be remote.Let the customer remote, I first tried one, the same error occurred.AnalysisCheck the SQL
An exception occurred in the SQL Execution Plan after flashing back to drop to restore the table.----- Normal execution planSet autotrace traceonlySet linesize 1000Select/* + index (t idx_object_id) */* from t where object_id = 19;Execution
To use this function, mysql version must be 5.0.37 or later. Otherwise, you can only use the explain method to check.
The profiling function provides more detailed information such as cpu io.
The show profile format is as follows:
Show profile [type[,type]...][FOR QUERYn][LIMITrow_count[OFFSEToffset]type:ALL| BLOCK IO| CONTEXT SWITCHES| CPU| IPC| MEMORY| PAGE FAULTS| SOURCE| SWAPS
By default, this function is disabled:
Mysql> select @ profiling;
+ ------------- +| @ Profiling |+ ------------- +|
Oracle developers analyze SQL Execution plans with complicated and complex focus. They may be confused by the developers' eyes and cause a sexy and silly SQL statement to run on the server, focus on a few parts, as for others, of course, don't you like, (I) Number of returned rows Oracle optimizer is a major indicator of cost-based, evaluation cost is the number
How the Oracle database collects ORA-00904 errors in the execution plan and resolution of the specified SQL
(Copyright notice, I original or translated articles for reprint, such as reprinted for Personal learning, please specify the source; otherwise please contact me, the offender must investigate)
How to collect the exec
DB2 does not exist in the explain table of the SQL Execution Plan by default. Therefore, you need to create an explain table as needed during use. How can you create it? In fact, DB2 still provides a variety of methods for you to use. The first method is to use the script EXPLAIN. DDL by default, which is created in the following path of the database by default:
StreamAggregate and ComputeScalar occur when an aggregate function (MIN, MAX, COUNT, AVG, or SUM) is used in an aggregate query. SELECTCOUNT (*), AVG (Value) fromm2c_10 min and MAX functions require stream aggregation. Other functions in the execution plan require stream aggregation followed by one or more scalar calculation operations. -12.
How Does Oracle view the execution plan of an SQL statement based on the dynamic performance view?
How Does Oracle view the execution plan of an SQL statement based on the dynamic performance view?
1. Authorize a user to view
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.