This article briefly introduces the differences between MyISAM and InnoDB. Based on their features, we can further optimize MyISAM and InnoDB as much as possible.
Brief introduction from the official website.
Brief Introduction: MyIsam
MyISAM is the
Today, because the server is automatically shut down, the error "fail1Table" appears when I open the website again. \ xxx "is marked as crashed and shoshould be retried red. After analysis, I found two ways to solve this problem on the Internet, for
This article shares an article on mysql date formatting implementation. This article mainly introduces some references for date_format () functions and their usage in cmd mode, in fact, it is the same in cmd and php. If you need it, you can refer to
In this article, count (*), broupby, and order by are used to query the most repeated records in the mysql database and list them in descending order.
The Code is as follows:
Copy code
SELECT keyword, count (*) AS countFROM
This article collects a large number of questions from the Internet about how to use mysql indexes to optimize your own databases. It also introduces some situations that cannot be found in index columns.
Below are some information found on the
This MySQL server has gone away was suddenly encountered during development today. The analysis may be that the SQL statement sent is too long and exceeds the size of max_allowed_packet. If this is the reason, you only need to modify my. cnf:
This is just a reference, because mysql performance optimization involves many factors. The best optimization is based on the actual situation of your server and website. If you need it, please refer to it.
1. IntroductionIn the Web application
In MySQL 5.0.3 and later versions, the length of the varchar data type can reach 65535, that is, 65532 bytes of data can be stored, and the start and expires bits occupy 3 bytes. That is to say, in versions earlier than 5.0.3, data stored in fixed
Table Structure:Copy the Code as follows:---- Table structure 'category'--Create table if not exists 'category '('Id' int (11) not null AUTO_INCREMENT,'Type' int (11) not null comment '1 is Article type 2 is product type 3 is download type ','Title'
1. Use the rowid Method
2. Use the group by Method
3. Use the distinct method
1. Rowid Method
The statement is as follows:Query data:
Select * from table1 a where rowid! = (Select max (rowid)
From table1 B where a. name1 = B. name1 and a. name2
Index
You can use indexes to quickly access specific information in the database tutorial table. An index is a structure that sorts the values of one or more columns in a database table, for example, the last name (lname) column of the employee
Difference between truncate delete and drop statements
Differences:1. truncate and delete: delete only data. Do not delete the table structure (Definition)The drop statement will delete the constraints, triggers, and indexes that the table
Returns the latest ID method when inserting SQL data.
SELECT LAST_INSERT_ID (). SELECT @ IDENTITY can be connected. But that brother hasn't done it by the afternoon. Because I don't know how to run it .. Projects are all three layers. It is
C # Two Methods for connecting to the mysql tutorial database tutorial
Mysql provides a dll file named "mysql. data. dll ", I am currently using this dll file, put this file (see the attachment) under the bin directory of the website, you can use it.
SQL exists is an existence judgment. exists is an existence judgment. If there is a result in the following query, exists is true; otherwise, it is false. drop table Student; Drop table StudentExam; Drop table Exam; create table Student (StudentID
SQL as Alias usage
Mysql tutorial> create table Topic (-> TopicID smallint not null AUTO_INCREMENT
Primary key,-> Name VARCHAR (50) not null,-> InStock smallint unsigned not null,-> OnOrder smallint unsigned not null,-> Reserved smallint unsigned
The DATE_ADD () function adds a specified interval to a date.
SyntaxThe DATE_ADD (date, INTERVAL expr type) date parameter is a valid date expression. The expr parameter is the time interval you want to add.
The type parameter can be of the
Mysql tutorial database tutorial backup
When using mysql databases, database backup is the most common and important. So we will first introduce database backup. Database Backup is also a formal database backup method. It shares the same concept
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