[Reprint]
1. No index or no index is used (this is the most common problem of slow query and is a defect in programming)
2. Low I/O throughput, resulting in a bottleneck effect.
3. the query is not optimized because no computing column is created.
4.
Go to: http://bbs.chinaunix.net/archiver/tid-2331601.html[B] Using transactions (C # programming) in three layers of web development [/B]
Many database operations require transactions. There are roughly three levels of transactions under Asp.net:(1)
I. Stored Procedures (storedprocedure) are a set of SQL statements for specific functions in a large database, which are compiled and stored in the database, you can specify the name of a stored procedure and provide parameters (if the procedure
How to lock a row table database 1 how to lock a row of a table
SET transaction isolation level read uncommitted
Select * from Table rowlock where id = 1
2. Lock a table in the database
Select * from table with (holdlock)
Lock
Lock: we know that the most common method to handle concurrent access by multiple users is locking. When a user locks an object in the database, other users cannot access the object. The impact of locking on concurrent access is reflected in the
There are many reasons for slow query speed. The following are common causes:
1. No index or no index is used (this is the most common problem of slow query and is a defect in programming)
2. Low I/O throughput, resulting in a bottleneck effect.
3.
How expensive is page splits in terms of transaction log?By:paul Randal page splits is always thought of as expensive, but Just how is they? In the This post I want to the Create an example to show how much more transaction log was created when a
Global variable @ @TRANCOUNT:Returns the number of active transactions for the current connection.An explicit transaction:Begin TRANSACTION The beginning of a clear real transaction.The most common type of transaction.Implicit transactions:By
Ways to improve query speed with data above millions:1. Try to avoid using the! = or <> operator in the WHERE clause, or discard the engine for a full table scan using the index.2. To optimize the query, avoid full-table scanning as far as possible,
How can I store images in a database ?. If you are using an sqlserver database! If you do not want to use background operations, you can see the following operations on text. you can see 1. write operation (WRITETEXT). the general functions are used
Transactions are all about atomicity. The concept of Atomicity refers to the ability to treat things as a unit. From the database perspective, it refers to the minimum combination of one or more statements that should be executed or not executed at
2nd some database SQL language data manipulationlanguage (DML) data manipulation languages (DataManipulationLanguage, DML) include insert, delete, and update statements for adding, deleting, and modifying data. This article uses the following table
Often, a thread from a different connection reads/updates the same table, which causes blocking and SQL Server handles it automatically to prevent dirty reads. However, there is a common scenario where the rows that are read/updated for each
Whether intentionally or unintentionally, if a transaction remains open in the database, it blocks other processes from manipulating the modified data. Similarly, backing up the transaction log only truncates the part of the transaction log for
The origin of 11.4.1 Affairs
When you update a database with the delete command or the update command, you can only manipulate one table at a time, which can cause data inconsistencies in the database. For example: The enterprise cancels the
SQL not common function summary and transaction, add, delete trigger
Distinct delete duplicate rows
Declare @x declares a variable
CONVERT (varchar (), tscore.tenglish) type conversion
Cast (xx as varchar (10)) type conversion
Www.jb51.net
======
Typically, short time blocking is not a problem and is required by a busier application. However, poorly designed applications can lead to prolonged blocking, which unnecessarily locks resources and blocks other sessions from reading and updating
More or less have done a tree directory, product classification, such as level two or level three menu, if you encounter more levels of classification, the general use of recursion. Using recursion in a program more or less adds some performance
DBCC page parsing row data
The DBCC page usage is detailed:
DBCC page ({' dbname ' | dbid}, FileNum, Pagenum [, printopt={0|1|2|3}])
The printopt parameter has the following meanings:
· 0-print just the page header
· 1-page header plus Per-row hex
SQL Transaction Usage
Simply put, a transaction is a mechanism for maintaining the integrity of the database.Its implementation form is to embed ordinary SQL statements into the BEGIN Tran ... Commit Tran (or full form Begin Transaction ... Commit
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.