1. add, delete, modify, and query DML (DataManipulationLanguage-data operation language) in Oracle can be executed under the following conditions: insert data into the table, modify existing data, and delete existing data. A transaction is composed of DML statements that complete several tasks. 2. Insert data operations to list columns in the default sequence of columns. In the INSERT clause
1. add, delete,
different. Select*from dualSelect*from dual In fact, the case is different, the Query Analyzer is considered to be two different SQL statements, must be parsed two times. Generate 2 execution plans. So as a programmer, you should ensure that the same query statements everywhere are consistent, one more space is not! Don't write
How to compile efficient SQL query statements and SQL statementsOverview
How can I write SQL query statements with high performance? Two Methods: creating reasonable indexes and writing efficient SQL statements
Basic Principles of
After learning how to use ibatis over the past few days, I suddenly used fuzzy queries and dynamic multi-condition queries. I tried it for a long time based on my own ideas and did not solve this problem.
The first problem is fuzzy query. At the beginning, I used the following conditions: Select * from user where name like '% # value # % '. but why not? It seems that an error has been reported. later, I found a solution on the Internet, which is t
; registry> parameter file The character set must be consistent, but the language settings can be different. We recommend that you use English for language settings. If the character set is zhs16gbk, The nls_lang can be American_America.zhs16gbk. Involves three character sets,1. Character Set on the El server side;2. Character Set of oracle client;3. dmp file character set. During data import, the three character sets must be consistent before the da
, Oracle converts ' * ' to all column names, which is done by querying the data dictionary, which means more time is spent (4) reduce the number of access to the database:Oracle has done a lot of work internally: Parsing SQL statements, estimating index utilization, binding variables, reading chunks, and so on; (5) in Sql*plus,
Alibaba Cloud SQL Intelligent Query analyzer, a database query and analysis management tool developed by delphi.
To facilitate your work, you can use a database query and analysis management tool developed by delphi to share with you the following features:
1. Due to the use of ADO connections, it theoretically sup
Oracle multi-Table query optimization and Oracle Optimization
ORACLE has a high-speed buffer concept. This high-speed buffer is used to store the executed SQL statements. Therefore, oracle has to do a lot of work when executing
tuning:the Definitive Reference This entire book describes the details of the SQL tuning. Nevertheless
To improve system systems, Oracle DBAs should follow some of the general guidelines below.
1. SQL Tuning Target
is to extract more data rows with minimal database access to generate the best execution plan (Minimize physical read (PIO) and logical Rea
. Move the table space data file
#先确定数据文件据在表空间
Sql>select tablespace_name,file_name from Dba_data_files where file_name= '/u01/test.dbf ';
#open状态
Sql>alter tablespace test offline; Sql>host move/u01/test.dbf/u01/oracle/test.dbf; Sql>alter tablespace Test rename datafile '/u
meaningful in practical work. (14) using the alias of the table:When you concatenate multiple tables in an SQL statement, use the alias of the table and prefix the alias to each column. This reduces the time to parse and reduces the syntax errors caused by column ambiguity. (15) Replace in with exists with not exists instead of in:In many base-table-based queries, it is often necessary to join another ta
to use sql/xml build functions such as XmlElement, Xmlforest, and XMLAgg (). XQuery will be more efficient than these functions in the 2nd edition of Oracle database G. Specifically, using the Ora:view XQuery function inside an XQuery expression, you can query an existing relational table or view and build XML on the fly, eliminating the need to explicitly creat
1.create user username identified by password;//build username and password Oracle
2.grant CONNECT,RESOURCE,DBA to username;//authorize Grant CONNECT,RESOURCE,DBA,SYSDBA to username;
3.connect username/password//Enter.
4.select table_name,column_name from User_tab_columns where table_name= ' mview_log ';//table name in query table, field name, and so on.
5. How do I execute a script
Example:1) Find employee information with a salary above 3000SELECT *Froms_emp Ewhere e.salary>3000;2) Find all information about employees who are known as CarmenSELECT * FROM S_emp EWheree.first_name = ' Carmen ';"Oracle SQL keywords, table names, column names, etc. are case insensitive, and the values in the records are case sensitive"3) Find out the employee information without performanceSELECT * FROM
query character sets on oracle server
There are many ways to find the character set of the oracle server. The intuitive query method is as follows:
SQL> select userenv ('language') from dual;
USERENV ('language ')
----------------------------------------------------
SIMPLIF
session is completed by alter session. If the session has no special settings, it will be consistent with nls_instance_parameters.The character set of the client must be the same as that of the server to correctly display non-ASCII characters of the database. If multiple settings exist, alter session> environment variable> registry> parameter fileThe character set must be consistent, but the language settings can be different. We recommend that you use English for language settings. If the char
also to reduce the duplication of shared memory information, Oracle can accurately count the frequency of SQL execution.2, where the condition order after the influenceThe condition order after the WHERE clause has a direct effect on the query of the large data scale. Such as:Select * from zl_yhjbqk where dy_dj = ' 1KV or less ' and xh_bz=1Select * from Zl_yhjbq
Tags: Create your own first build table REM position input will be the best1. OverviewSQL is a database-oriented structured Query language. is a computer standard language that conforms to ANSI, the national standardization organization of the United States. SQL has the operation of the database: adding and deleting changes. Create a database, create a table, create a stored procedure, create a view, and mo
continue to process the next suspended task.SQL language and TSQL (called tsql,oracle plsql in SQL Server) language is an advanced descriptive languageWhen a SQL statement is complicated, imagine that a SELECT statement is accompanied by multiple join1 use [Gposdb] 2 GO 3 SELECT * FROM [dbo]. [Ct_append] As a 4 INNER JOIN 5 [dbo].[ Ct_fuelingdata] as B 6 on A.
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.