--------------------- The following is the Oracle database -----------------------------
SQL statement Optimization Methods: 30 examples
We often use hint in the SQL statement optimization process. Here we summarize the common Oracle hint usage in the SQL optimization proces
Oracle SQL classical query expert Article 4
Oracle SQL classical query expert Article 4
This article is the fourth article on typical query of OracleSQL. It is just the author's own opinion. If you have any questions, I hope you can provide suggestions or methods. At the same time, you are welcome to add that, if you h
From: http://www.iteye.com/topic/508161
Recently, javaeye found that many comrades know little about SQL optimization. Recently, I have summarized several articles for reference only. However, a few of them may depend on the situation, most of them are quite effective.
[Note: (inefficiency) and (efficiency) are both equivalent .]
1. Connection sequence in the WHERE clause:Oracle uses the bottom-up sequence to parse the WHERE clause.According to
Tags: visible test current access think analysis grouped spreadsheet rulesOne: Download routeII: Book DrawingThree: Catalogue
The 1th Chapter SQL core1.1 SQL language1.2 Interface of the database1.3 Sql*plus Review1.3.1 Connecting to a database1.3.2 Configuring the Sql*plus environment1.3.3 Execute command1.4 5 Cor
--sql statements are case-insensitive, but for readability, you can capitalize all the keywords, all lowercase for non-critical children.SELECT sysdate from dual;--sql statements are categorized according to function:--DDL statement (data definition language)--Used to manipulate database objects. Database objects include:--tables, views, indexes, sequences--->1.
The main differences between DB2 and ORACLE SQL notation
To be honest, Oracle has spoiled the country's programmers, and SQL in the code is flooded with Oracle features, and almost no one knows what ANSI's standard SQL
:
SELECT * FROM(SELECT z.type , z.code ,ROW_NUMBER()OVER(PARTITION BY z.type ORDER BY z.code) AS code_idFROM group_info z)WHERE code_id =1;
The over () mentioned here is an oracle analysis function.
Refer to the SQL reference document:
Analytic functions compute an aggregate value based on a group of rows. They differ from aggregate functions in that they return multiple rows for each group.Analytic functi
Oracle PL/SQL Composite data types
Composite data types can be roughly divided into two types. The first type is record type, which is suitable for processing single row and multiple columns of data, a bit similar to VO in java; the first type is set type, suitable for processing Single Column and multiple rows of data, similar to List in java, the following expe
speed.⑤ you can consider creating an index for a table that queries 2%~4% only from the total number of rows. The following are the basic principles of creating an index:(1) based on the query keyword, the rows in the table are randomly sorted.(2) A table containing a relatively small number of columns.(3) Most of the queries in the table contain relatively simple whrer clauses.(4) For tables that are often based on query keywords, and the rows in th
--oracle, "How do we deal with this problem?"
I want to help, but my methods may have been wrong all along. Maybe I should write a summary to summarize some of the problems that may be involved. When other people ask me for help, I can give him the list of questions. If the person is receiving an ordinary Oracle initiation education, the
When using Oracle, you always encounter java. SQL. the SQLException error caused me to be exhausted on the Internet, so I checked several common ones in one breath and listed them here. english is from the official website. I have simply translated it in Chinese. Some people do not know how to translate it or try to reproduce it. So I will list the original Engli
1. Cursor Concept
A swimming cursor is a handle or pointer to a context area.
When you perform a crud operation in a pl/sql block, Oracle assigns the context area to it in memory. Using the database language to describe a cursor is a position entity that maps on a row of data in the context area result set.
A user can use a cursor to access any row of data in the result set, and the row data is manipulat
Sql0668n cause code is "1 ", therefore, the SQL state = 57016 Oracle cannot be imported to db2sql0668n at a time because the cause code is "1" sqlstate = 57016 Oracle to DB2 Sun Moon King's blog http://sunmoonking.spaces.live.com using MTK tool failed to import data, so (Oracle uses MTK tool to import data to DB2
Http
Common commands and functions of Oracle SQL * plus, oracleplus
Common commands:
Connect to sqlplusRun cmd in the command line to enter. For example, to log on in sys mode, the command is as follows:(1). sqlplus "sys/zhb126 as sysdba"
(2). sqlplus/nolog connect sys/zhb126 as sysdba
(3). sqlplus scott/tiger
Start a database instance
Startup -- start the control file and data file while starting the database
S
SQL execution is slow, how fast and accurate optimization.
SQLHC is one of the best tools.
By getting all the SQL execution plans, list the actual performance bottlenecks, listing the number of rows on the table where SQL resides, the data and distribution of each column, the existing index, the actual ex
1, do not use ' * ' instead of all column names, especially if the field is more than the caseUse SELECT * To list all column names for a table, but there is a dynamic parsing problem with Oracle. The Oracle system translates ' * ' into all column names of the table by querying the data dictionary, which naturally consumes system time.2, when the whole table is d
conjunction with or as a variety of the Case expression. Coalesce returns the first not null value in a given list of values. E. g.: returning the first not null value available in four columns present in a table. Select coalesce (col1, col2, col3, col4) from am25; E. g.: The above example will return the same result as the below statement with the case expression. Select case when col1 is not null then col1 when col2 is not null then col2 when c
Tags: ACK contact exp Payroll init Arch List Condition action 1 --Remove duplicate rows: Distinct
2 --scope: Is the combination of all subsequent fields
3 Select distinctDeptno Sal fromEMP;4 SELECT * fromEmpORDER bySal;5 --Condition of (date type)
6 SELECT * fromEmpWHEREHireDate='1 July-December on -80';
7 --use a like fuzzy query (% for 0 or more characters, _ for one character, special characters for escape identifiers)
8 SELECT * fromEmpWHEREEn
DATABASE Archivelog ALTER DATABASE OPENView commands supported by Sqlplus Help INDEXUnlocking user Locks Executed with the user password set in the first step of installing Oracle (e.g., Sqlplus "sys/zhb126 as SYSDBA") Alter user Scott account unlock; Then execute Sqlplus scott/tiger, which will ask you to modify Scott's new password.Setting command line support spaces Set Sqlblanklines onVariable substitution-variable substitution-this process only
Tags: des blog http io ar os using SP forHttp://www.cnblogs.com/sopost/archive/2010/10/11/2190076.html in the SQL statement optimization process, we often use the hint, now summarize the SQL optimization process common Oracle Usage of hint:1./*+all_rows*/Indicates that the cost-based optimization method is selected for the statement block, and the optimal through
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.