frequent exchange.Innodb_log_file_size: Single InnoDB log file size.Max_connections: Maximum number of connections4 loading the database into memory Put frequently accessed data into memory (e.g. 30% of data into memory)5 SSD Storage6 horizontal expansion?? Vertical expansionHorizontal Scaling7 Pursuit of Visualization Database is affected by traffic load, application and other errors, in order to quickly and effectively solve the problem, need to have a monitoring mechanism.Common monitoring
used with the GROUP by clause of a SELECT statement Where can the aggregation function be used? 1. Select list (subquery or external query) for the selected statement. 2, COMPUTE, or COMPUTE by clause. 3. HAVING clause Common functions SQL avg (average) SQL count (total) SQL First () SQL last ()
Database PL/SQL script language function learning notes function build syntax rules: create [or replace] function function_name [(parameter,…)] Return datatype is variable declaration; begin statement ;... [Execption statement;…] The end; www.2cto.com function has only the IN mode parameter. The return value can be imported only from the calling environment, and the return type of the function can be return
Label:The 1.distinct is used to return a value that is removed from the duplicate and used to remove the select distinct name from student 2.select newid () generates a unique value that is not duplicated. Both globally unique identifiers The difference between 3.varchar and char: Although VARCHAR2 is more space-saving than char, if a VARCHAR2 column is often modified and the length of each modified data is different, this causes a ' row-migration ' phenomenon, which creates redundant I/O, which
1 distince value can be used for column name Distince ID cannot be distince *2 Time Function Day (getdate ()) Gets days year (GETDATE ()) Gets the month (GETDATE ()) months DateDiff (Day,getdate (), ' 2015-12-14 ') Gets the time difference, DateAdd plus DatePart Datename get part of time3 stored procedures in the final or SQL statement assembly, for the frequently used data source with temporary table, you can be a temporary table as a temporary varia
JoinSystypes b onA.xtype=B.xusertypeInner Joinsysobjects D ona.ID=D.id andD.xtype='U' andD.name'dtproperties'
Left Joinsyscomments E onA.cdefault=e.id Left JoinSys.extended_properties g ona.ID=g.major_id andA.colid=g.minor_id Left JoinSys.extended_properties F onD.id=F.class andf.minor_id=0
whereB.name is not NULL
--where d.name= ' table to query '--if you only query the specified table, add this condition
Order byA.id,a.colorder Other operations conform to the
Label:1.1 Create a database1.1.1 Create a default databaseCreate Database Db_sqldata (Db_sqldata is the DB name)1.1.2 to create a database that specifies the location of the database fileCreate DATABASE Mydatabase1On(Name=mydatabase1_data,Filename= ' E:\mydata\Mydatabase1_data.mdf ',Size=4,MAXSIZE=10,filegrowth=10%)Log on(Name=mydatabase1_log,Filename= ' E:\mydata\Mydatabase1_log.ldf ',Size=1,Maxsize=6,Filegrowth=1)Note: The SQL statement is case-inse
Tags: Click http rev to make an informational numbering relationship INF T-SQL statementModifying the properties of a data tableWhen you save the changes to the data table, you always get a warning that prevents changes.There are 2 ways to solve this problem:1. You can use T-SQL statements to forcibly modify2. Tools Option Designer Table Designer and Database Designer block save requirements Check outSet fo
Tags: class definition _id where begin update floor statistic cost 1 ---20161107, loop execution SQL statement
2
3 Declare @i int --Defining Variables
4 Set @i= $
5 while @i106 --set up a loop condition
6 begin
7 --EXECUTE Statement
8 UpdateMms_t_d_mematstatistics9
Ten
One --rand (): Returns a random number of 0-1;
A --ceil (x): Returns the smallest integer greater than or equal to X;
- --Floor (x), in contrast to Ceil (), produces the largest
The 1.SQL statement selects the first two records from the Websites table:SELECT * from Websites LIMIT 2; select TOP 50 PERCENT * from Websites 2. Wildcard charactersThe A.SQL statement selects all Web sites with the URL beginning with the letter "https": WHERE url like ' https% ' b.sql statement select name starts with an arbitrary character, then all customers with "Oogle" SELECT * from WebsitesWHERE name like ' _oo
1. Most SQL queries contain only a single SELECT statement that returns data from one or more tables, but SQL also allows multiple queries (multiple SELECT statements) to be executed and the result returned as a query result set. These combined queries are commonly referred to as and or compound queries.There are two main scenarios in which you need to use a combination query:(1) Return structure data from
'Get Column NameSelect column_name from Information_schema.columns where table_name= ' table_name 'Get contentSelect ' column_name ' from Schema_name.table_nameSqlilabs 's Less-24 has experienced the next two injectionsRegister to create an account with admin ' # , password is 123you can make a change to the password, and when you change the password, two injections will occur, because # will update the query with the following commentcan see by changing the admin ' # user's password, the resul
. If it is a derived property, it is represented by a dashed ellipse.
Contact (Relationship): With a diamond, the diamond box is indicated by the contact name, and the non-forward side is connected with the relevant entities, while in the non-edge side of the contact type (1:1, 1:n or m:n). In the case of a weak entity, the diamond is then set outside the diamond.
The relationship between conceptual data model and E-R model
The conceptual Data Model (conceptual) is also known a
remainder of two numbers. SelectFName, Fweight, fweight%5 fromT_person # -), natural logarithm: #MySQL中: #LOG (X) The function accepts a parameter.
Also accepts a parameter of two numbers. #LOG (b,x) B is the integer entered for itself.
X is the parameter to be asked.
The logarithm of the bottom of the #MySQL支持以2为底, base 10, at any self-input. SelectFName, Fweight, LOG (fweight) fromT_personSelectFName, Fweight, LOG2 (fweight) fromT_personSelectFName, Fweight, LOG10 (fweight) fromT_personSelec
What is "anti-pattern"Anti-patterns are a way of trying to solve a problem, but they often cause other problems at the same time.Anti-Pattern classification(1) Logical Database design anti-patternBefore you begin coding, you need to decide what information is stored in the database and how best to organize and correlate the data.This includes tables, fields, and relationships for how to design a database.(2) Physical Database design anti-patternOnce you have identified what data you need to stor
What is "anti-pattern"Anti-patterns are a way of trying to solve a problem, but they often cause other problems at the same time.Anti-Pattern classification(1) Logical Database design anti-patternBefore you begin coding, you need to decide what information is stored in the database and how best to organize and correlate the data.This includes tables, fields, and relationships for how to design a database.(2) Physical Database design anti-patternOnce you have identified what data you need to stor
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.