In the ASP era, if we want to build a database-driven Web site, then you can choose to ring a lot of money in the Microsoft SQL Server database or choose to spend a lot of time to find the performance and stability of the unified Access database,
Infinite class Classification 、、、 but efficiency is not the best ... Do you have code for faster and better efficiency?
When you use recursion to wait for more categories, it can affect efficiency!
Please share!
Class.sql
----
The structure '
Gb2312,gbk,utf8, such as the support of multibyte-encoded character sets can store Chinese characters, gb2312 in the number of Chinese characters is far less than GBK, and GB2312,GBK can be encoded in the UTF8.
Two. Show variables like ' character\_
To display a database or table:
Show databases;//can then use database_name;
Show tables;
Change table name:
ALTER TABLE table_name rename new_t;
To add a column:
ALTER TABLE table_name ADD column c_n column attributes;
To delete a column:
In fact, the bottleneck of project application is at DB end, in the case of only a small amount of data and very few concurrent, it does not need much skill to get the results we want, but when the amount of data reaches a certain level, every
The correct compilation method is important, but it is only part of improving the performance of MySQL server. Many of the parameters of the MySQL server affect the performance of the server, and we can save these parameters to the configuration
Using the Mysqldump tool, the basic usage is:
Shell> mysqldump [OPTIONS] database [tables]
If you do not give any tables, the entire database will be exported.
By executing mysqldump--help, you can get the options table supported by your
MySQL regular backup is an important work, but manual operation is too cumbersome, also difficult to avoid omissions, use the following methods to allow the system to back up data on a regular basis.
1. Create a backup folder
#cd/www
#makedir
Chinese New Year due to online database often too much pressure caused by the response is very slow or even panic, bite the teeth under the big determination to solve the problem of inefficiency!
First of all, because the company adhering to the
16, how the MySQL storage data
The database is stored as a directory.
Tables are stored as files.
Columns are stored in a file in a variable-length or fixed-length format. For the BDB table, the data is stored in a page form.
Supports
Vi. Optimization of applications
Should concentrate on solving the problem.
When writing an application, you should decide what is most important:
Speed
Portability between operating systems
Portability between SQL Servers
Use a persistent
One, we can and should optimize what?
Hardware
Operating system/Software Library
SQL Server (settings and queries)
Application Programming Interface (API)
Application
Second, optimize the hardware
If you need a large database table (>2G), you
This code is modified from Uchome code because it is handled in order to solve the efficiency of uchome. This thinking is actually a long time, but has not been to do, I believe that some people have the same idea, if there is a similar, that really
"Guide" In this article, we will focus on which of these different engines are best adapted to which requirements and how to enable different storage engines.
Storage Engine
Data in MySQL is stored in files (or memory) in a variety of different
If a MyISAM table contains any variable-length columns (VARCHAR, blobs, or textdynamic), or if a table is created with the row_format=dynamic option, the dynamic storage format is used.
This format is a bit more complicated, because each row has a
With the popularization of network, more and more web-based applications are used. The network database is one of them. Through one or several servers can provide services for many customers, this way to bring people a lot of convenience, but also
There are a lot of articles on the internet to teach how to configure the MySQL server, but given the different server hardware configuration, the specific application of the differences, the practice of those articles can only be used as a
MySQL 1046 Error Resolution:
? PhpRequire_once './include/common.inc.php '; $maxpostnum = 200; Set the minimum number of posts if (! $discuz _user | |! $discuz _PW) {ShowMessage (' Sorry, you haven't logged in yet, you can't do this. ');} if (!
MyISAM is the default storage engine in MySQL, and it's not usually a lot of people who care about this stuff. Deciding what kind of storage engine to use is a very tricky thing to do, but it's worth studying, and the article here only considers the
We all know that MyISAM reading data is faster than InnoDB, but importing a large number of tables is MyISAM record especially slow, here is my summary of MySQL in the import and export of big data to speed up the methodI. Import data using into
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