Transactions are also an important aspect of access to the persistence layer of Hibernate. Hibernate not only provides support for local transactions, but also allows the use of container-managed global transactions. Hibernate has the following
In some cases, the or condition can avoid full table scan.
1. If the where statement contains the or condition, the myisam table can use indexes, but innodb does not.
1) myisam table:
Create table if not exists 'A '(
'Id' int (1) not null
1. When writing a query statement, make sure that the Java type matches the database type. If not matched, the query efficiency may be affected.
For example:
2 when writing an insert statement, if the target field may be blank, you can use the
Each subquery of union must have the same number of columns, and the columns at the corresponding position must have the same data type. However, the column names can be different. Order by can only be used in the last subquery of union.And this
I. Pre-compiled SQL statement Processing
Precompilation interface PreparedStatement is an interface in java. SQL, which is a self-interface of Statement. Statement sends the complete SQL Statement to the database after being compiled. The
PairMongoDBEveryone who knows about MongoDB has a headache.Global lock(Read/write lockAnd allow concurrent reads, while writing will block all reads and writes. The worst thing is that this lock is not at the table level, not at the database level,
SQL syntax writing is very long, and SQLPLUS is not automatically completed. If you forget the format, you can get help through the document.
SQL syntax description in the official document:1. keywords and Parameters
Square is the key word. elliptic
When installing with mysql-5.0.51a-linux-i686-glibc23 today, a little bit of problem occurs
All programs have been completedHowever, when mysqld_safe is started, it is proposed as follows:
[Mysql @ cyou-inc ~] $ Mysql_bin/bin/mysqld_safe: line 199:
The Oracle paging query is generally implemented as follows:Select * from (Select a. *, rownum r from (Your own SQL) A where rownum ) Where r>?
If this SQL statement is sorted by a field containing repeated values
Duplicate records will be found on
I have encountered some database problems during performance tests recently. I usually use slow query logs to find SQL statements with poor execution performance. However, I cannot find these SQL statements only, we need to help developers analyze
Oracle user status
Currently, databases, especially Oracle databases, are used in many industries. However, many enterprises seldom invest in database management and maintenance. The actual problems are self-evident:
1. DBAs have worked very hard to
Combination of range partitions and hash partitions or list partitionsSyntax:
PARTITIONBYRANGE (column_name1)
SUBPARTITIONBYHASH (column_name2)
SUBPARTITIONS number_of_partitions
(
PARTITION part1 value less than (range1 ),
PARTITION part2
Allows users to partition data that does not have a logical rangeYou can run the HASH function on the partition key to determine the partition to store.Evenly distribute data to different partitionsSyntax:
PARTITIONBYHASH (column_name)
PARTITIONS
Oracle job
Execute the following script in plsql to create a job that is executed at every night.
Begin
Sys. dbms_job.submit (job =>: job, -- job ID
What => 'dbms _ output. pub_line (''asdf ''); ', -- execute the script
Next_date => to_date ('17
Variable binding is widely used in OLTP environments. This is due to OLTP features and SQL statement execution processes. Typical OLTP transactions are short. Similar SQL statements have high execution rate and high concurrency; oracle performs hash
Architecture and Backup recovery principles1. The most important thing about Oracle database is online redo log.AnalogyControlfile: corporate executivesDatafile: Production WorkshopOnline redo log: Finance DepartmentNote:System tablespace is the
Oracle spatial data SQL query related instances
-- Select dlbm, dlmc, trim (zldwdm) as zldwdm_1 from gzdt where nvl (zldwdm, 'T') = 'T' or zldwdm = '';Update gzdt set ZLDWDM = '000000' where nvl (zldwdm, 'T') = 'T' or zldwdm = '';Commit;Delete from
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