Tags: blog ar sp div art C on logThe Awrdd is used for a comparison of two awr snapshots to achieve performance at different times of the year.Run the following statement for example to get AWRDD:@?/rdbms/admin/awrddrpt.sql2025 23 February 07:12 12026 23 February 12027 23 February All 12028 23 February 10:00am 12029 23 February 11:24 12030 23 February 12031 23 February 2014 11:26 12032 23 February 11:31 12033 23 February 11:31 12034 23 February 11:41
Refer to http://www.oracle.com/technetwork/tutorials/tutorials-1876574.html for detail.
Some of the content is copied here.
The G1 garbage CollectorThe Garbage-first (G1) collector is a server-style garbage collector, targeted for multi-processor machines with large mem Ories. It meets Garbage collection (GC) Pause time goals with a high probability, while achieving high throughput. The G1 garbage collector is fully supported in Oracle JDK 7
Oracle notes: Table and field (4) constraints are divided into two types: column constraint and Table constraint. A column constraint is a constraint defined on one column. A Table constraint is a constraint defined on two or more columns. Www.2cto.com 10. primary key constraint: alter table mytable add constraints name primary key (FIELD [, FIELD...]); 11. UNIQUE constraint: alter table mytable add constra
3.4 Section Group attributes
Section group supports querying documents containing internal structures (such as html and xml documents). You can specify
You can limit the query range to the header. In html, xml, and other similar structures
In addition to the content to be displayed, there are also a large number of identifiers used to control the structure. These identifiers may not be indexed, this is a major function of section group (original article: In order to issue WITHIN queries on docum
42. chartorowidConvert character data type to rowid typeSQL> select rowid, rowidtochar (rowid), ename from Scott. EMP;
Rowid rowidtochar (rowid) ename----------------------------------------------Aaaafkaacaaaaeqaaa SmithAaaafkaacaaaaeqaab AllenAaaafkaacaaaaeqaac wardAaaafkaacaaaaeqaad Jones
43. Convert (C, dset, sset)Convert the source string sset from one language character set to another destination dset Character SetSQL> select convert ('strutz', 'we8hp ', 'f7dec') "Conversion" from dual;
Con
The Oracle database uses a variety of system locks to protect internal databases and memory structures that are transparent to the user.Latch (latches)A latch is a simple, low-level serialization mechanism that coordinates multiple users using shared data structures, objects, and files, and latches to protect shared memory resources in parallel processing, specifically, to protect data structures in the following scenarios:1) be modified in parallel b
query less efficient SELECT T.*From t_three_killed T where T.c_age in (SELECT r.c_age from t_three_killed R WHERE r.c_age between33 and); --EXISTS as long as the query statement can return a single piece of data, the entire expression is true and applies to more subquery data, SELECT T.*From t_three_killed T where EXISTS (SELECT r.c_age from t_three_killed R WHERE t.c_age=R.c_age and R.c_age between33 and); --Like fuzzy query escape escape character--in a pattern, the wildcard is interpreted as
, 2) LENGTH ('World') REPLACE ('SQL', 'Q', 'x ')
--------------------------------------------------------
He 5 sXl
In the above example, we can see that the function of substr () is to intercept a string, followed by two parameters. The first parameter represents
Start position. The second parameter indicates the number of interceptions. The length () function returns the length of the string. Replace () string followed by two
Parameters. The first parameter indicates the letter to be replaced
4. Create oracle username tablespaces, tables, insert data, and user management tables in windows and Linux
Log on to the super administrator and run the following command:
Create databases, tablespaces, users, and insert data in Windows
-- 01 create a tablespace-- Note that the tablespace path is adjusted according to the actual installation environment.Create tablespace ts_mysco
Create a table as follows:
Student basic info tableCreate student ([Studentid] [int] identity (1, 1) not null primary key, -- primary key[Studentname] [char] not null
)Course info tableCreate subject ([Subjectid] [char] not null primary key, -- primary key[Subjectname] [char] not null)Orders tableCreate grade ([Studentid] [int] not null, -- Union primary key[Subjectid] [char] not null, -- Joint primary key[Grade] [int] not null,Primary Key (studentid, subjectid))
1. Change the table creation com
addition to '|.
SQL> select concat('Hello ' , 'world' ) from dual ; CONCAT('HELLO','WORLD')-----------------------Hello worldSQL> select substr('hello' , 1 , 2) ,length('world') , replace('sql' , 'q' , 'X') from dual ; SUBSTR('HELLO',1,2) LENGTH('WORLD') REPLACE('SQL','Q','X')------------------- --------------- ----------------------he 5 sXl
In the above example, we can see that the function of substr () is to intercept a string, followed by two parameters. The first paramet
Oracle study note (4) Foreign key-create table major_ning (mid number (2) primary key, mname varchar2 (30) referenced in the master table (parent table )); -- from the table (sub-table), refer to the create table student_ning (id number (5) primary key, name varchar2 (20), mid number (2 ), constraint stuning_mid_fk foreign key (mid) references major_ning (mid); insert into major_ning values (1, 'computer ')
each node to do the following, here is also listed in order to maintain the overall installation logic. Install the image source Yum install http://dl.fedoraproject.org/pub/epel/7/x86_64/e/epel-release-7-5.noarch.rpm
Yum Install/HTTP rdo.fedorapeople.org/openstack-kilo/rdo-release-kilo.rpm
Yum Upgrade Note: Foreign servers, domestic visits may occur in a less stable condition installing selinux Yum Install Openstack-selinux At this point, the network and other basic environment to build,
single-record functions in SQL
1.ASCII
Returns the decimal number corresponding to the specified character;
Sql> Select ASCII (' a ') a,ascii (' A ') a,ascii (' 0 ') zero,ascii (') space from dual;
A A ZERO space
--------- --------- --------- ---------
65 97 48 32
2.CHR
Give an integer and return the corresponding character;
Sql> Select Chr (54740) ZHAO,CHR () chr65 from dual;
En C
-- -
Zhao A
3.CONCAT
Connect two strings;
Sql> Select Concat (' 010-', ' 88888888 ') | | Turn 23 ' Gao Hu bid fro
be the same, the length must be the same, the primary foreign key must be consistent Equivalent equal to no conditional connection -- Natural Connection
Select * from EMP
Join Dept (7) Union query: Multiple projection results merged together with the keyword UNION ALL The number of columns required to query results must be the same: The data type of the corresponding column must be the same, length FMD differs UNION ALL display Union automatically removes duplicate data -- Federated Queri
Oracle performance optimization operation 4: Remove quot; IN quot;, quot; OR quot; whenever possible;
The Where clause containing "IN" and "OR" usually uses a worksheet to invalidate the index;
If a large number of duplicate values are not generated, consider splitting the sub-statement. The split sub-statement should contain the index.
Example:
Select count (*) from stuff where id_no in ('0', '1');
Use OCCI to access the Oracle database (4), occioracle
This article focuses on problem summary and will be updated in the future.
1. When executing Environment * env = Environment: createEnvironment ();, an exception is thrown. The code isORA-32104, but no error message
The reason is that the library used does not match. For example, if I use the 11 library, the environment is 10 Gb, so we need to put F: \
How to use Oracle database in PHP (4) use OCI to input data to the data table 'email _ info'
Same as above, but it is written using OCI.
Related PHP code:
If ($ submit = "click "){
// The submit button was clicked!
// Get the input for fullname and email then store it in the database.
PutEnv ("ORACLE_SID = ORASID ");
$ Connection = OCILogon ("username", "password ");
If ($ connection = false ){
Echo OC
First, give a smallProgram:
1
Set
Serveroutput
On
2
Declare
3
Maxrecords constant
Int
:
=
100
;
4
I
Int
:
=
1
;
5
Begin
6
For
I
In
1
.. Maxrecords Loop
7
Insert
Into
Testtable (recordnumber, currentdate)
8
Values
(I, sysdate)
9
End
Loop;
10
Dbmps_output.put_line (
'
Successfully entered data
'
);
11
Commit
;
12
End
;
) rangebetweenInterval'2' DayPreceding andInterval'2' Dayfollowing) Five_day_avg fromCust_orderwhereSale_price is not NULL andOrder_dtbetweenTo_date ('01-jul-2001','dd-mon-yyyy') andTo_date ('31-jul-2001','dd-mon-yyyy')--displays sales for the current month, one months, one months, and average sales for every 3 monthsSelect Month, First_value (sum(Tot_sales)) Over (Order by MonthRowsbetween 1Preceding and 1following) Prev_month,sum(tot_sales) Monthly_sales,last_value (sum(Tot_sales)) Over (
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.