Content of this Chapter◆ Database overall analysis and design ◆ database establishment ◆ improvement of database objects This chapter reviews, contacts, and consolidates previous studies. By establishing a micro-student information database instance,
-- Demo 1:
Use northwind
Go
Set statistics Io on
Go
Select count (*) from northwind. DBO. Employees
Go
Set statistics Io off
Go
Use northwind
Go
Exec sp_spaceused employees
Go
-- DEMO 2:
Set statistics time on
Go
Select count (*) from northwind.
1. Define the cursor DefinitionThe core of a cursor statement is to define a cursor Identification name and associate it with a query statement. The DECLARE statement is used to DECLARE the cursor. It defines the data set stored in the cursor
(1) usage of Scheduler
When multiple users perform concurrent operations on the database, the following data inconsistency occurs:
(1) lost updatesA and B read and modify the same data. The Modification result of one user destroys the Modification
I. Why should I introduce locks?
When multiple users concurrently perform database operations, the following data inconsistency occurs:
◆ Update loss
A and B read and modify the same data. The Modification result of one user destroys the
Set table1 (A, B, C)A B CA1 b1 c1A2 b2 c2A3 b3 c3
1) exclusive lockCreate two connectionsExecute the following statement in the first connection:Begin tranUpdate table1Set A = aaWhere B = b2Waitfor delay 00:00:30 -- wait 30 secondsCommit tranExecute
***************Set Table1 (A, B, C)A B CA1 B1 C1A2 B2 C2A3 B3 C3
1) exclusive lockCreate two connectionsExecute the following statement in the first connection:Begin tranUpdate Table1Set a = 'A'Where B = 'b2'Waitfor delay '00: 00: 30' -- wait 30
Interaction between HTML, PHP, and MySQL
Why databases?World Wide Web (WWW) is not just a place to provide information. If you have something to share with people all over the world as a website. However, this is not an easy task. When the
Data normalization: divides data into multiple tables as much as possible to minimize the number of times the same data is repeated. Main object elements of ado.net: Data source: a relational database, such as sqlserverManaged Data supplyProgram:
Original http://blog.csdn.net/guoxuepeng123/article/details/7849681
1. subquery usageA subquery is a SELECT query nested in select, insert, update, and deleteStatement or other subqueries. Subqueries can be used wherever expressions are allowed.
This morning, I saw another bug during inspection:
A select query using a connect-by clause executing using parallel query may fail with ORA-600 [qerpxInitialize].
Bug 7308675 oeri: qerpxinitialize from parallel query using connect
This note
1. Create a database table:
CopyCode The Code is as follows: Create Database Club;
Create Table member (
Id int (11) not null auto_increment,
No varchar (5) not null,
Name varchar (10) Not null,
Age int (2) not null,
Level varchar (10) Not
SQL Server lock type (SQL) favorites1. holdlock: Keep the shared lock on the table until the entire transaction ends, instead of releasing the added lock immediately after the statement is executed.2. nolock: no shared or exclusive locks are added.
SQL Study Notes (19) ----------- about MySQL database optimization and mysql database Optimization
A mature database architecture is not designed with high availability, high scaling, and other features at the beginning. It is gradually improved
PostgreSQL tutorial (19th): SQL language functions, postgresqlsql
I. Basic concepts:
SQL functions can contain any number of queries, but the function returns only the results of the last query (which must be SELECT. In simple cases, the first row
I. Principle of MySQL master-slave Replication
What is mysql master-slave Replication
Mysql supports several different forms of replication, such as single bidirectional, chained cascade, and asynchronous replication. During the replication process,
When querying data, we usually need to specify the rows of data to be returned. For example, if there is a B/S architecture application, each page may display only 30 records. To improve the display efficiency, the database is generally required to
[Essence series] Mysql essence, mysql
What Mysql requires to be remembered and mastered
1./* View operation */Actions 1./* view operation */
Show processlist -- display which threads are running show variables -- View VARIABLES2./* Database
1. Optimize Your MySQL query Cache
You can enable the High-Speed query cache for queries on the MySQL server. It is one of the most effective ways to improve performance by quietly processing the database engine in the background. When the same
How to get better full-text search results in MySQL
Author: Techrepublic.com.com
11:14:53
Many Internet applications provide full-text search functions. Users can use a word or word segment as a query item to locate matching records. In the
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.