Use Set NoCount On when writing a stored procedure

Use SET NOCOUNT ONBy default, the stored procedure returns the number of rows affected by each statement in the process. If you do not need to use this information in an application (not required by most applications), use the set nocount on

How to quickly kill database processes that occupy too many resources (CPU and memory)

In many cases, exceptions or program errors may cause individual processes to occupy a large amount of system resources. to end these processes, run the following command to Kill the process:Alter system kill session 'sid, serial #'; However, this

Quick solutions for full SQL server database logs

First, a complex method is provided to compress logs and database files as follows:1. Clear logsDump transaction database name WITH NO_LOG2. truncate transaction logs:Backup log database name WITH NO_LOG3. Compress database files (if not compressed,

Create an index for the database (2)

Next, let's make it a little more complex. What if there is an order by clause? Believe it or not, most databases will benefit from the index when using order.SELECT * FROM mytableWHERE category_id = 1 AND user_id = 2Order by adddate DESC;A little

MySQL Join details

Create table firstCreate table emp (Id int not null primary key,Name varchar (10));Create table emp_dept (Dept_id varchar (4) not null,Emp_id int not null,Emp_name varchar (10 ),Primary key (dept_id, emp_id ));Insert into emp () values(1, "Dennis-1 "

SQL Server generates XML files based on query results

/*Isn't 'bcp' an internal or external command or a program that can be run?Check whether the bcp.exe file exists in C: Program FilesMicrosoft SQL server80toolsbinn.Check whether the directory C: Program FilesMicrosoft SQL Server80ToolsBinn is added

Encoding of MySQL 4.1

The following is a very boring article, which is filled with a lot of encoding, conversion, client, server, connection ...... Well, I don't want to see it myself, but I think it makes some sense to write it down for four reasons: MySQL 4.1 has

Improve PHP performance by caching database results (2)

Create a notification Handler Now you can create a notification handler, which will use the sendNotificationThe process sends a change notification to the client. Let's take a look at the PL/SQL process orders_nf_callback in Listing 2.List

MySQL (c api) VC instance and code download (1) (4)

11.1. Column and column conversion-common Assume that there is a student summary table (CJ) as follows: Name Subject Result Zhang San Chinese 80 Zhang San, mathematics 90 Zhang San physical 85 Li Si Chinese 85 Li Si mathematics 92 Li Si physical

MySQL (c api) VC instance and code download (1) (2)

10. SQL statement skills 1. A problem with an SQL statement: column and column Conversion Select * from v_temp The preceding view result is as follows: User_name role_name ------------------------- System Administrator Feng Administrator Feng

MySQL (c api) VC instance and code download (1)

1. Description: copy a table (only copy structure, source table name: a new table name: B) SQL: select * into B from a where 1 <> 1 2. Description: copy a table (copy data, source table name: a target table name: B) SQL: insert into B (a, B, c)

Analysis of MySQL database account authorization management (1) (2)

1.1 who can connect and connect from there? You can allow a user to connect from a specific host or a series of hosts. There is one extreme: If you know that a demotion is connected from a host, you can limit the permissions to a single host: Grant

MySQL manual version 5.0.20-MySQL optimization (2) (1) (4)

The following example shows how to optimize the performance of Multi-table joint query by using the information provided by EXPLAIN. Assume that the following SELECT statement is used, and the EXPLAIN statement is intended to be used for detection:

PHP: an alternative solution when MySQL is not supported

Generally, no mysql support is provided for personal free homepage space, that is, it is also very demanding, so it is important to find a good alternative!PHP file processing is very powerful, so it can be replaced by file access!(When there is no

The problem that PHP cannot connect to the MSSQL database

Today, a new server is configured with IIS php. when running the result, an error occurred while connecting php to the remote mssql database. The error code is as follows:Warning: mssql_connect (): Unable to connect to server:I think it was okay

Common PHP program to connect to SQLServer Database

Many of my friends asked me how to use a php program to connect to a common class of SQL Server database. In fact, this is not very difficult. The key point is to be careful, patient, and understanding with passion.Class DB {Var $ Host = "192.168.0.1

PHP and database ODBC

ODBC for PHP Databases ODBC is an application programming interface (API) that allows you to connect to a data source (such as the MS Access database ).--------------------------------------------------------------------------------Create an ODBC

Tips for saving data with mysql int

Public function insert ($ data){If (isset ($ data ['content']) &! Empty ($ data ['content']){$ Data_for_query ['content'] = trim ($ data ['content']);}Else{Return false;}If (isset ($ data ['user _ id']) &! Empty ($ data ['user _ id']){$

Php import phpmyadmin to generate SQL files

Share my methods. Only valid for SQL files exported by myadmin in the php tutorial $ Dbfile = "test. SQL ";$ Content = iconv ("UTF-8", "gb2312", file_get_contents ($ dbfile ));// Obtain the created data// Remove comments$ Content = preg_replace ("/-

Php mysql_real_escape_string () function

Mysql tutorial _ real_escape_string () function escape special characters in strings used in SQL statements. The following characters are affected: X00NR '"X1aIf yes, the function returns the escaped string. If it fails, false is

Total Pages: 12780 1 .... 9043 9044 9045 9046 9047 .... 12780 Go to: GO

Contact Us

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

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.