Oracle performance optimization operation 11: try to match the like clause at the front end. oracle clause
Because the like parameter is frequently used, if the like clause can be indexed, the query efficiency will be greatly improved.
Example:
In this tutorial, you will learn how to use the Oracle LIKE operator to test whether a value in a column matches a specified pattern.The Oracle Like operator describesSometimes, you want to query the data according to the specified pattern. For
Oracle performance optimization operation 11: like clause frontend matching as much as possible
Because the like parameter is frequently used, if the like clause can be indexed, the query efficiency will be greatly improved.
Example:
Select *
Because the like parameter is used very frequently, it is highly efficient to use the index for the LIKE clause.Cases:SELECT * from the city where name like '%s% ';The execution plan for the above query uses a full table scan (table ACCESS complete),
The format of a general SELECT statement is as follows:1. Querying all columns of a specified tableSELECT * from Table name [ where condition ] [group by Group column name ] [having? Aggregation Functions ] [order by sort column name? ] asc|
Use the TOP clause to limit the data updated by the UPDATE statement. topupdate
You can use the TOP clause to limit the number of rows modified in the UPDATE statement. When the TOP (n) clause is used with UPDATE, the delete operation is performed
Oracle SQL Performance 1. ORACLE optimizer:. RULE (based on Rules) B. COST (COST-based) c. CHOOSE (optional) sets the default optimizer. various declarations of the OPTIMIZER_MODE parameter in the ora file, such as RULE, COST, CHOOSE, ALL_ROWS,
TOP clauseThe TOP clause is used to specify the number of records to return.The TOP clause is useful for large tables with thousands of records.Note: Not all database systems support the TOP clause.Syntax for SQL Server:SELECT TOP number|percent
SQL turning is a tool in the Quest Central software produced by Quest Corporation. Quest is an integrated, graphical, Cross-platform database management solution that can manage Oracle, DB2, and SQL Server databases simultaneously.
Introduction to
SQL optimization should be adjusted from five aspects:1. Remove unnecessary full table scans for large tables2. cache full table scan for small tables3. Verify the use of optimized Indexes4. Verify the optimized Connection Technology5. minimize the
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.