query optimizer lists several sets of possible connectivity scenarios and finds the best solution for the least cost of the system, based on the join conditions, before the multiple table operations are actually executed. The join condition takes into account the table with the index, the table with many rows, and the selection of the inner and outer tables can be determined by the formula: the number of matches in the outer table * The count of each lookup in the inner-layer table, and the pro
cost of the system, based on the connection conditions, before the multiple table operations are actually executed. The join condition takes into account the table with the index, the table with many rows, and the selection of the inner and outer tables can be determined by the formula: the number of matches in the outer table * The count of each lookup in the inner-layer table, and the product minimum is the best scheme.
2. View the method of executing the scheme--with set Showplanon, open th
table directly. For example: Select ID from t where num in (three-in-one) is not used in between for consecutive values: Select ID from t where num between 1 and 32. When judging true or false is, if a nd or OR: (When a "where condition 1 and Condition 2" is present, the database executes the statement to the right first) and tries to put the false to the right (a false is false) or try to put it to the right (one for true) 3. Avoid the WHERE clause as much as possible. , which causes the engin
>299999 and ID It is clear from the execution plan that the last method is used instead of the previous two ways of querying.That's what the internet says, but you do the test 100W data, the cost plan is the same. ********************************************* 3. The function operation does not satisfy the Sarg form, causes the index to be unusableExample: The columns in the following SQL conditional statements are indexed appropriately, but are very slow to execute: SELECT * FROM record wher
connections, based on the join conditions, before it is actually executedand find out the best solution for the least cost of the system. The connection condition takes into account the table with the index, the number of rowstable; The selection of the internal and external tables can be determined by the formula: the number of rows in the outer table that matches each lookup in the inner table, multiplied byProduct minimum is the best solution.----2. View the method of executing a scenario--w
:
SELECT * FROM record where
SUBSTRING (card_no,1,4) = ' 5378 ' (13 seconds)
SELECT * FROM record where
amount/30SELECT * FROM record where
Convert (char, date,112) = ' 19991201 ' (10 seconds)
----Analysis:
The result of any operation of the column in the----WHERE clause is computed by column in SQL Runtime, so it has to
Do a table search without using the index above the column; If the results are available when the query is compiled,
Can be optimize
record where
SUBSTRING (card_no,1,4) = ' 5378 ' (13 seconds)
SELECT * FROM record where
amount/30SELECT * FROM record where
Convert (char, date,112) = ' 19991201 ' (10 seconds)
----Analysis:
The result of any operation of the column in the----WHERE clause is computed by column in SQL Runtime, so it has to
Do a table search without using the index above the column; If the results are available when the query is compiled,
Can be optimized by the SQL op
.
----Summary:
----1. The query optimizer lists several sets of possible connectivity scenarios and finds the best solution for the least cost of the system, based on the join conditions, before the multiple table operations are actually executed. The join condition takes into account the table with the index, the table with many rows, and the selection of the inner and outer tables can be determined by the formula: the number of matches in the outer table * The count of each lookup in the inn
several sets of possible connectivity scenarios and finds the best solution for the least cost of the system, based on the join conditions, before the multiple table operations are actually executed. The join condition takes into account the table with the index, the table with many rows, and the selection of the inner and outer tables can be determined by the formula: the number of matches in the outer table * The count of each lookup in the inner-layer table, and the product minimum is the be
indexed, but the execution speed is very slow in the case of 300,000 rows of data:SELECT * FROM record where SUBSTRB (cardno,1,4) = ' 5378 ' (13 seconds)SELECT * from record where amount/30SELECT * FROM record where TO_CHAR (Actiontime, ' yyyymmdd ') = ' 19991201 ' (10 seconds)Because any action on a column in the WHERE clause results in a row-wise calculation of the SQL runtime, it has to perform a table scan without using the index above the column
It is clear from the execution plan that the last method is used instead of the previous two ways of querying.That's what the internet says, but you do the test 100W data, the cost plan is the same.*********************************************3. The function operation does not satisfy the Sarg form, causes the index to be unusableExample: The columns in the following SQL conditional statements are indexed appropriately, but are very slow to execute:SELECT * FROM record where substring (card_no,
Label:Optimization of the database1). SQL Statement optimization A try to avoid using the! = or b You should try to avoid null values for the field in the WHERE clause, otherwise it will cause the engine to abandon using the index for a full table scan, such as: Select ID from t where num is null You can set the default value of 0 on NUM, make sure that the NUM column in the table does not have a null value, and then query: Select ID from t where num=0 C many times replacing in with exists is a
the system to not use the index and can only search the data in the table directly. For example: Select ID from t where num in (three-in-one) is not used with between for consecutive values: Selectid from T where num between 1 and 32. When judging the true and false is , if with and OR OR: (when there is a "where condition 1 and Condition 2", the database executes the statement to the right first) and try to put the false to the right (a false is false) or try to put it to the right (a true for
difficult to scroll the Web page with two fingers, as is the time to select a string of text.
One of the reasons for Venue Pro to stand out from the small Windows tablet is that it has a full HD 1920x1080p screen, as we mentioned above. This screen is the IPs material, so from a large angle is also very good, and the screen will not be too shiny, can be used for a long time without glare or glare. Venue Pro Built-in dual speakers, the sound is a bit thin, but enough to see the video or call th
The Dell Inspiron M511R (m511rd-628) design specification is AMD Radeon HD 6470M+AMD Radeon HD (integrated processor) dual graphics card, A's graphics card switching is not fully automated, need to manually switch, Now the switching method is in the video card driver inside the manual selection of the card chip on it, the switch does not need to reboot.
ATI graphics card By default is an integrated graphics operation, such as the need to customize th
When my parents decided to buy me the first laptop, I almost did my best to scrape up some extra money and chose to buy a bigger product---15-inch Dell Inspiron E1505. However, it was not long before I found that, with the passage of time and the rapid development of notebook products, not only the speed of product replacement increased, my personal needs have improved. The past notebook is no longer my TV, my game machine, even my desk and tray. Beca
ado| Data Ado.net provides a new model for the operation and storage of data in memory. Therefore, we should change the brain when dealing with hierarchical data. This article will give a simple description of its uniqueness.
Reader requirements: Basic mastery of Visual c#.net, DataAdapter, and Datasets.
Environment
[Configuration One]Operating system: Windows 2000 ServerComputer: Dell Inspiron 8000 NotebooksContent: 512MBProcessor: PIII 750 MHzTools
Tags: ubuntu jdk myeclipse
Check to see if your Ubuntu Linux operating system architecture are 32-bit or 64-bit, open up a terminal and run the follow ing command below.
Uname-a or File/sbin/init
Linux caochu-inspiron-n5110 3.13.0-32-generic #57-ubuntu SMP Tue Jul 03:51:08 UTC x86_64 x86_64 x86_64 gnu/linuxCheck If you have the Java installed on your system. To does this, you'll have a to run with the Java version comma
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.