--Resource TableSelectT1.cmtsresourceid,--resource ID GUID t1.createtime,--Create Time T1.fileext,--extension T1.filename,--file name T1.filesize,--file size, integer t1.ismultifile,--is not a compound file T1.title,--title
new DBCC parameter is added, that is, 1222. Originally in 2000, we know that DBCC can be executed. -- Traceon (1204,3605,-1) to view all deadlock information. In sqlserver 2005, 1204 is enhanced, which is 1222. Go If object_id ('T1 ') is not null drop table T1 If object_id ('p1') is not null drop proc p1 If object_id ('p2 ') is not null drop proc p2 Go Create Table
sql2005, a new DBCC parameter is added, that is, 1222. Originally in 2000, we know that DBCC can be executed.
Traceon (,-1) to view all SQL Server deadlock information. In sqlserver 2005, 1204 is enhanced, which is 1222.
Go
If object_id ('T1 ') is not null drop table T1
If object_id ('p1') is not null drop proc p1
If object_id ('p2 ') is not null drop proc p2
Go
Create Table
Tags: proc ORM scan SSE query condition exec pre res loop1. The test data is as follows:Sql> select * from T1;A | B | C---+----+---1 | 10 | 12 | 20 | 23 | 30 | 34 | 40 | 45 | 50 | 56 | 60 | 6(6 rows)Sql> select * from T2;A | B | D---+----+---1 | 10 | 12 | 20 | 23 | 30 | 3(3 rows)2. Parse the example SQL as follows:SELECT *From (SELECT * from t1 where C >= 2) T1 L
The two table structures were
CREATE TABLE ' t1 ' (
' id ' int (one) not null auto_increment,
' rid ' int (one) not NULL,
' num ' int (one) not NULL,
PRIMARY KEY (' id ')
) Engine=innodb auto_increment=24236 DEFAULT Charset=utf8;
CREATE TABLE ' T2 ' (
' id ' int (one) not null auto_increment,
' sid ' Int (one) not NULL,
' num ' int (one) not null,
primary KEY (' id ')
) Engine=innodb auto_increment=24287 DEFAULT Charset=utf8;
I. Unordered collectionSet operation, set set is a list that does not allow duplicates 1.1 Sadd (name, values)# add elements to the collection that corresponds to name 1.2 Smembers (name)# get the name corresponding to all members of the collection R.sadd (' s1 ', ' t1 ', ' T2 ', ' T3 ', ' T1 ') print (r.smembers (' s1 ')) # output {b ' t1 ', b ' T2 ', b ' T3 '
First look at the sample SQL statement to parse:
Copy Code code as follows:
SELECT * FROM dual
SELECT * from dual
Select C1,C2 from TB
Select C1,C2 from TB
Select COUNT (*) from T1
Select c1,c2,c3 from t1 where condi1=1
Select c1,c2,c3 from T1 Where condi1=1
Select C1,c2,c3 from T1,t2 wher
In Oracle, how does one obtain user table information and other details ?, Oracle acquisition
1. Get the User Name of the current user
SELECT USERNAME FROM USER_USERS;
2. Obtain the names of all tables under a user.
SELECT TABLE_NAME FROM ALL_TABLES where owner = 'username'; -- case sensitive
3. Obtain the details of a table under the current user.
Select t. TABLE_NAME, -- table name T. COLUMN_NAME, -- field name T. DATA_TYPE, -- field type T. DATA_LENGTH, -- length T. NULLABLE -- whether it is
adjustment is sufficient. The hit rate is high, which is already 0.95, so the hit rate is quite impressive. For database systems, the DEFAULT buffer pool included in the data buffer zone is sufficient for applications.
Query the logical and physical read information of each buffer in the data buffer. You can query the dynamic performance view v $ buffer_pool_statistics. For example:
SQL> selectt1.name, response _ READS, t1.DB _ BLOCK_GETS,
Ⅰ.select General SyntaxSelect selection list from table expression [sort declaration] [intercept] Ⅱ. Table Expression 1.from clauseFrom Table_reference [, table_reference [, ...]] The FROM clause generates a virtual table from a comma-delimited list of table_reference, with Jion. Table_reference can be a table name or a generated table, such as "subqueries, table joins, or complex combinations of these things." If more than one table is listed in the FROM clause, then they "jion" (the connection
can add column family, alter ' T1 ', {NAME = ' F1 ', VERSIONS = 5} Put table disable after alter, then enable)column Qualifiers (columns qualifier)--------The data in the column family are positioned by column qualifiers or columns. Column qualifiers do not have to be defined beforehand. column qualifiers do not have to be consistent between peers, just like a row health, where the column qualifier has no data type and is always treated as a byte arr
SQL Profile provides other information except system statistics and object (table and index) statistics for an SQL statement, such as the running environment and more accurate statistics, to help the optimizer select a more suitable execution plan for SQL statements.SQL Profiles can be said to be the evolution of Outlines. The functions that Outlines can implement can also be fully implemented by SQL Profiles, while SQL Profiles have optimizations that Outlines do not have. The most important ar
) values ('Eee ', '2017-02-02 02:02:02 ')
Insert INTO [Table] (Y, X) values ('Eee ', '2017-03-03 03:03:03 ')
GO solves the classic SQL problem of "The latest X of every Y": The following methods are really amazing
The Code is as follows:
Select ID, Y, X
FROM [Table] T1
Where (NOT EXISTS
(Select 1
FROM [Table] T2
Where (T2.Y = T1. Y) AND (T2.X> T1. X or
T2.X =
Tags: automatic ASE Insert data conflict ima on () nod group \ nSELECT DISTINCT * from t[,t1] WHERE condition GROUP By column has conditions ORDER by column [asc| DESC] LIMIT n,m;And,or,like LIMIT M OFFSET N;Condition and OR like Writing orderSelect--from--where--group By--having--order byExecution orderFrom--where--group By--having--select--order by Like _%andORNotBetween. and..InchIs NULLis not NULL Execution order: where > Aggregation >having mys
1 Nested Loops Join--we use the set Statistics_level=all to observe the execution plan of the following table join statement:--T2 table is accessed 100 times (drive Table access 1 times, drive Table Access 100 times)--This set Linesize 1000 has an effect on the dbms_xplan.display_cursor, if not set, the output by default will be a lot less columns, such as buffers, etc.Set Linesize 1000Alter session set Statistics_level=all;SELECT/*+ Leading (t1) use_
- */ - Public voidSetDataSource2 (Joinpoint point) { -Dynamicdatasourceholder.setdatasource ("DataSource1"); + } - +}Then, configure the bean and intercept rules for this slice, and the XML is configured as follows:1 BeanID= "DataSourceAspect2"class= "Com.test.context.datasource.DataSourceAspect2" />2 Aop:config> 3 Aop:aspectref= "DataSourceAspect2"> 4 intercept all methods under the DS1 module -5 Aop:pointcutID= "
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.