1, from the top down queryUse start with a= ' starting ID ' connect by prior a= BA is a subkey and B is the parent.Select F_ca_code,f_ca_parentcode,level from with='0' by=Query Result:Where level is the Oracle built-in functionIf you join a query,
Oracle "CONNECT by" is a hierarchical query clause that is typically used for queries of tree or hierarchical result sets. Its syntax is: [ START WITHcondition ] CONNECTBY[ NOCYCLE ] condition Description1. Start with: Tells the system which node to
I. Transactions and stored ProceduresHow transactions are used in a stored procedure. When you need to execute multiple additions, modifications, and deletions of SQL statements in a stored procedure, we need to use transactions to ensure data
SELECT from WHERE = and = ?The problem arises:Today's production Code performance scan This script is pulled out, because this thing is too long execution time, the back of the Code brothers are blocked, and then found that the guy is doing a full
1. Eliminate duplicate rowsIn the results of an Oracle query, there may be several rows in the same situation, so you can use distinct to eliminate duplicate rows.Code Demo: Distinct eliminate duplicate rows2. Null operationIf there is a missing
In the previous blog examples, we created a function-based index, but if you execute the following query:select * from EMP where substr (ename,1,1) = ' S ';The resulting execution plan will still be (TABLE ACCESS full) because the function-based
These articles of Oracle Performance optimization operations can be used in conjunction with each other. And the various methods of interaction, close contact.This connection is both consistent and may bring conflict, when the conflict occurs, the
One, a stored procedure with a cursor There are two types of cursors as arguments: 1. Declaring the system cursor type Sys_refcursor1) The cursor acts as a parameter to the stored procedure:--stored procedures with cursorsCREATE OR REPLACE
One. The SQL language supports the following categories of commands1. Data definition Language (DDL): Create, Alter (change), and drop (delete) commands1.1 Create (creating tables, table spaces, users, indexes, views, synonyms, procedures,
DBA training content notes and dba training content notes014-12-23slow hang lock: three common performance problems: hang. The whole database does not respond and new connections cannot be created. hanganalyze output. whether the dump file has
Table Partitioning (learning notes), Table Partitioning learning notes
Table partition:
Application Scenario: For tables with a large data volume, for example, tables with 2 GB of data, 20 pieces can be queried, which is certainly faster than
OracleDML Error Log
DML error log is an error log function introduced by oracle10gR2 similar to SQL * Loader. The basic principle is to transfer any records that may cause statement failure to an error log table.
The specific usage is as follows:
1.
Create and call functions and stored FunctionsFunction [in out parameter]
-- Function [in out parameter] create or replace function get_test (m_id in number, str1 out varchar2) -- The parameter does not need type length return varchar2 is str2
Common Oracle functions-character and mathematical functions
Various functions are often used in the development and use of oracle. This chapter summarizes simple strings and mathematical functions, which will be convenient to use in the future, it
Oracle performance optimization operations: Summary
These articles about oracle performance optimization can be used in combination with each other. In addition, various methods are closely related to each other.
This kind of connection is
Oracle performance optimization operation 18: whether to use full table scan or index
Like all tips, the last trick will go back to the starting point. Finally, let's discuss whether to create an index, maybe it is faster to perform a full table
Package (study notes) and study notes
Example 1,Locate all employees in the department according to the entered Department number.
First, create a package and define the package specifications.
Create or replace package getemp_pkg is FUNCTION
Oracle11gRMAN: ActiveDatabaseDuplicationforstandbydatabaseIf the production-based duplicate replication is not manually configured with pfile (set memory, process, dg-related configuration parameters, database-related path parameters), various
Oracle System Toolkit (Study Notes), oracle Study Notes
Dbms_Output package
No.
Subroutine name
Description
1
Enable
Open the buffer, when the user usesThis statement is automatically called when the "set serveroutput
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.
A Free Trial That Lets You Build Big!
Start building with 50+ products and up to 12 months usage for Elastic Compute Service