optimization | statement | execution
5th. Oracle's execution planbackground knowledge: To better carry out the following, we must understand some conceptual terms: Sharing SQL statementsIn order not to parse the same SQL statement repeatedly (because parsing operations cost resources, resulting in performance degradation), after the first parsing, Oracle stores SQL statements and parsed execution plans in memory. This memory in the shared buffer po
variables ALTER INDEX ix_c on _t REBUILD;GO SET showplan_all onGODECLARE @v varchar; SELECT * from _t WHERE c = @v; --varcharGO SET showplan_all OFF;GO ALTER INDEX ix_c on _t REBUILD;GO SET showplan_all onGODECLARE @nv nvarchar; SELECT * from _t WHERE c = @nv; --nvarcharGO SET showplan_all OFF;GOThe results for example are as seen in:Whether it is a varchar or a nvarchar variable, the estimated number of rows is 99.0099. This value is the same as the result of using the nvarchar constant va
, regardless of whether the specified value has only one data. The estimated results are all 99.0099, which indicates that the estimate does not take into account the values we specify.Further testing with variables ALTER INDEX ix_c on _t REBUILD;GO SET showplan_all onGODECLARE @v varchar;
SELECT * from _t WHERE c = @v; --varcharGO SET showplan_all OFF;GO ALTER INDEX ix_c on _t REBUILD;GO SET showplan_all onGODECLARE @nv nvarchar;
SELECT * from _t WHERE c = @nv; --nvarcharGO SET showpla
affect performance, 0 or 1 This identifies the status of the field because most of the data is the same index does not make any difference(Two indexes, 1 is a clustered index, 2 nonclustered indexes, a clustered index can have only one per table, a nonclustered index each table may have more than one, the primary key ID is a typical clustered index, the clustered index is similar to the dictionary lookup pinyin A, B, c ...) and the dictionary text content order is the same, the nonclustered ind
each step succeeds or fail, and finally select the step to begin with. In the Schedule tab, a maintenance plan that resembles a backup, filling out the scheduling cycle, which is the periodic cleanup cycle, is no longer detailed.If necessary, you can set the notification item after the job is completed on the last Notification tab, set up the operator, and set up the appropriate service, which is not specified here, usually not ... Originally are manually performed above the various operations,
defined, records in the table are displayed in the order in which they are entered. The primary key features: Uniqueness, non-nullability. Example of setting a primary KEY statement: Code int PRIMARY key, primary key cannot be empty, cannot be duplicated, ensures uniqueness Example of setting a self-growing primary KEY statement: The code int primary Key identity ( 1) starts at 1 each time , adding values you do not need to add this column To set a foreign key: Right-click on the table wh
(Dbms_xplan.display_cursor (null,0, ' allstats last '));The Dbms_xplan.display_cursor function is defined as:--Display from V$sql_plan (or V$sql_plan_statistics_all)function Display_cursor (sql_id varchar2 default NULL,Cursor_child_no integer default 0,Format varchar2 default ' typical ')Return dbms_xplan_type_tablepipelined;Where the parameter sql_id is the parent cursor, or NULL, indicates the SQL execution plan before the session is displayed. Cursor_child_no is the ordinal of a child cursor
White Cat Plan How to get the white statue?
Players as long as the game through the small new level can get the system presented white statue , the player can be found in the town building in the "warehouse" to find small white statue Click can
I've been in touch with Linux for years, at least for 5 years. Recently the company is engaged in internal training, everyone can enroll in training others. Think of yourself in the Linux immersion for many years, should come out a force. Always
The Daily tasks are:
1 complete backup or differential backup of the database on a regular basis.
2 regularly clean up the backup files, because the storage space is limited, you may need to save only a period of time files (such as a week or
Topic
From the title look, finally a bit into the feeling, is not it. Next Zed is going to teach us the simplest way to use a function. New Knowledge
A function is a piece of code that can be run repeatedly, using functions to improve the reuse of
How to intervene in the execution plan--Using hints hints
The cost-based optimizer is smart, and in most cases it chooses the right optimizer to ease the burden on the DBA. But sometimes it is clever to be mistaken, choose a bad execution plan, make
Internet
N years ago, Caoz wrote a number of "network success" of the rubbish article, some old friends may remember, yes, it is rubbish. At any time, caoz back to look at the things written before, there is a kind of unbearable 卒读 feeling, always
first, the index
MongoDB provides a variety of index support, the index information is saved in System.indexes, and the default is always to create an index for _ID, its index uses the basic and MySQL and other relational database. In fact, it can
Because the B*tree index does not store null values, some Oracle queries do not use indexes when the indexed field is allowed to be empty.
Most of the time, it appears that we can use a full index scan, which may give Oracle the chance to discard
1 The easiest way is to log in with the Pl/sql tool, select the SQL statement, and then press F5;
2 with Pl/sql tool login, open command Window
A) execution: Explain plan for SELECT * dual;--red part can be replaced with your SQL statement
b)
This article mainly describes several of the most common operation methods for updating the DB2 execution plan. Like the Oracle database, the DB2 database also uses an optimizer to analyze SQL statements, generate an Access Plan ). The DB2 optimizer
Use AWR to view the SQL Execution Plan. Find the problematic SQL statement in AWR and want to know the specific execution plan of the SQL statement, so I used the SQL id obtained in the AWR report to query several dynamic performance views such as V
A supervisor of IBM company said that the company may release a free version of DB2 database software next year. Teo, the brand manager responsible for information management at IBM Singapore, told the media: to enable developers to stay focused on
When a node is attached to a filter, the following example shows that a table is scanned once to filter the returned result set. However, it is interesting that when the condition is false
When a node is attached to a filter, the following example
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.