1. Sleep () Introduction
Sleep () is defined in Thread.java.
The function of sleep () is to let the current thread hibernate, that is, the current thread will go from "Run state" to "hibernate (blocked) state". Sleep () Specifies the time of hibernation, when the thread sleeps longer than/equal to the sleep time; When the thread is awakened, it becomes "ready" by the blocking state, which waits for the CPU's dispatch to execute.
2. Sleep () example
The following is a simple example to illust
' @ 'localhost' identfied by '123 '; create user 'egon' @ '%' identfied by '000000' create Remote Account create user 'wupeiqi '@ '123. 168.20.% 'identified by '123' create database db1 charset utf8 for the remote network account mysql-h192.168.000099-ualex-p123 to remotely connect to the database folder; Add the db1 folder show databases; view All databases show create database db1; view the db1 folder drop database db1; Delete the db1 folder alter da Tabase db1 charset gbk; change db1 encoding
Key2
Key3
As shown in, key1, key2, key3 is the unique row key value of three records, column-family1, column-family2, and column-family3 are three columns, each containing several columns. For example, the column-family1 family contains two columns named column1 and column2, t1: abc, t2: gdxdf is a cell uniquely identified by row key1 and the column-family1-column1. The cell con
Thread Communication concept: threads are independent individuals in the operating system, but these individuals cannot become a whole without special processing, and the communication between threads becomes one of the necessary ways for the whole. When a thread has a communication command, the interaction between the system is more powerful, while increasing CPU utilization will enable the developer to effectively grasp and supervise the thread task during processing. Use the Wait/notify metho
the only row key value for three records, and Column-family1,column-family2,column-family3 is a three-column family with several columns under each column family. For example column-family1 This column family consists of two columns, the name is Column1 and COLUMN2,T1:ABC,T2:GDXDF is uniquely identified by row Key1 and column-family1-column1 a cell. There are two data in this cell, ABC and GDXDF. The two-value timestamp is different,
block" for "this object" Access will be blocked. (1) First: when one thread accesses the synchronized method or synchronized code block of an object, the other thread has the synchronized method for that object or "Synchronized code block" Access will be blocked. The following is the demo program for "Synchronized code block".
Class Myrunable implements Runnable {
@Override public
void Run () {
synchronized (this) {
try {
int i = 0; I
Run Result:
This section focuses on the principles and usage of in, as well as the common erroneous viewpoints.
First, in the useUse of 1.1 inThe 1.1.1 and outer Two Table association fields are not emptySql> select * from TB1;T1 NAME1---------- ----------1 12 2Sql> select * from TB2;T2 NAME2---------- ----------2 2Sql> Select COUNT (1) from tb1 where T1 to (select T2 from TB2);--
The test found that even in 11.2, the problem still existed:
Sql> SELECT * from V$version;
BANNER
--------------------------------------------------------------------------------
Oracle database11genterprise Edition release11.2.0.1.0-64bit Production
Pl/sql Release 11.2.0.1.0-production
CORE 11.2.0.1.0 Production
TNS for Linux:version 11.2.0.1.0-production
Nlsrtl Version 11.2.0.1.0-production
sql> CREATE TABLE T1
2 (ID number,
3 NAME VARCHA
Oracle Database--sql Advanced QueryI. Related content1. Master the multi-table connection query for the SELECT statement.2. Master the subquery of the SELECT statement.Second, the specific operation(a) According to the EMP table and the Dept table under the Scott scheme of the Oracle database, do the following:1. Check the names of all employees who work for clerk and their department name.Select Ename,dname from scott.emp t1 inner joins scott.dept T
Many of the data blocks under the high watermark (HWL) are data-free, but the full table scans to high watermark data blocks, which means that Oracle does a lot of work! Therefore, Oracle provides shrink space defragmentation capabilities. For the index, you can take the rebuild online to defragment, in general, the object that often DML operations DBA to maintain regularly, while paying attention to update statistics in a timely manner!One: Prepare test data , use HR user, create
Label:Database in the daily use of the process, continuous insert,delete,update operation, resulting in the table and index fragmentation is inevitable, fragmentation is more, SQL execution efficiency naturally poor, the reason is very simple, high watermark (HWL) Many data blocks are no data, But the full table scan to scan to the high watermark data block, that is to say Oracle to do a lot of useless! As a result, Oracle provides shrink space defragmentation capabilities. For indexes, you can
.
Let's take an example of a 10053 event:
SQL> create table t1 as select rownum rn from dba_objects;Table created.SQL> create index ind_t1 on t1 (rn );Index created.SQL> exec dbms_stats.gather_table_stats (user, 't1', cascade => true );PL/SQL procedure successfully completed.SQL> create table t2 as select rn, 't2' name from t
not appear in the result set, and is displayed as null.
SQL Total Syntax basic syntax (full outer join)
SELECT * FROM table 1 full OUTER JOIN table 2 on table 1.userid= table 2.userid
SQL Leftist syntax Description: The above SQL full-link meaning is to display table 1 and table 2 all the rows, to put it simply, is the table 1 and table 2 all the rows together, then filter out duplicate data and display in the result set.
Okay, let me see. Performance comparison inline, leftist, right, full
Label:This morning and colleagues hot debate, arguing about the lock on a few basic concepts. Record lock, Gap lock, Next_key lock At that time, I found myself understanding the lock more thoroughly: The isolation level of the transaction is through the lock to achieve AH. RC: Record lock onlyRR: With record and Next_key lock Now let's talk about the lock implementations of various SQL statements in RR mode: CREATE TABLE t1 (ID int primary KEY auto_in
are three columns, each containing several columns. For example, the column-family1 family contains two columns named column1 and column2, T1: ABC, T2: gdxdf is a cell uniquely identified by row key1 and the column-family1-column1. The cell contains two data types: ABC and gdxdf. The timestamps of the two values are different, T1, T2, and hbase returns the value of the latest time to the requester.
The spe
This chapter covers the following topics:1. Yield () Introduction2. Yield () example3. Comparison of yield () and wait ()
1. Yield () IntroductionThe role of yield () is to give in. It allows the current thread to move from "Run state" to "ready state", this allows other waiting threads with the same priority to get execution rights, but there is no guarantee that after the current thread calls yield (), other threads with the same priority will be able to execute; it may also be that the curre
transaction (T1) are read by other transactions (T2) without being committed, and T1 does rollback operations, the data that the T2 just read does not actually exist.non-repeatable read , T1 read data item, T2 the data in it was modified or deleted and commit succeeded. If T1 attempts to read the data again, it will g
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.