SQL statement OptimizationI. General steps for SQL optimization(1), through the show status command to understand the frequency of execution of various SQL.(2), positioning execution Less efficient SQL statement-(key Select)(3) Explain analysis of
Trigger Brief1, Trigger basic concept2. Trigger syntax and practical examples3, before and after differencefirst, the basic concept of triggers1. Triggered2. Role: Monitor a situation and trigger an action3. Observe the sceneAn e-shop:Product list,
Because the shell appears to be a common feature between UNIX systems and is standardized by POSIX. As a result, shell scripts can be applied to many systems once they are "written attentively". Therefore, the reason to use shell scripts is based on:
ProcessPreface : A process refers to an instance of a program in execution . The new process consists of Fork () with the Execve () when the system call starts , and then execute , know that they have issued exit () until the system calls
On Linux, we can easily use the SCP command to copy files remotely, but because the SCP command itself has no save password option, so in the shell can not be like samba that way to save the password, more trouble, the following two implementation
The shell is actually a program that has a special function, mainly to provide a user interface with the kernel to interoperate. It is located between the user interface and the kernel, the workflow is to receive commands entered by the user and
1.Bash variablesUser-defined variables #局部变量environment variable #全局变量Positional parameter variablesPre-defined variablesX=val #赋值$x #调用Variable defaults to character type and cannot be directly calculated"$x" ${x} variable overlay, that is, the
When writing a program, the condition is used to determine whether the test condition is established. Many times, the judgment condition is multiple, this time needs to use the logical operator. What are the logical operators that are commonly used
Write Shell script:1) Editor like VI or Mcedi2) Set Execute permission for your scriptchmod permission Your-script-namechmod +x your-script-namechmod 755 your-script-name This would set read write execute (7) permission for the owner, for group and
Method One: Add debugging options when you run the script:"Usage" bash– option./shellscript.sh-e: If a command returns a non-0 exit status value (failed), exit.-N: You do not need to execute the script just to check the syntax structure and return
This document is referenced from http://www.cnblogs.com/zhuyp1015/archive/2012/07/11/2586985.htmlAWK: useful Data processing toolsAwk is also a great data-processing tool! SED is often used for the processing of an entire row, and awk prefers to
If you manage a large number of sites and servers, it is quite painful to modify the configuration file every time. So I thought of using shell scripts to generate bulk configuration files and configuration data. The following script is a shell
1, the variable with = assigned value when the left cannot have spaces. For example , UserName =nihao returns userName: Command not found . Because this place username as a command to deal with. The right approach is to Username=nihao.Careful is the
Linux shell reads the file line by line,Read File lines
For
Command replacement
Code block redirection
While
Pipeline operator
Code block redirection
For
IFS=$'\n'for line in `ls -l`do (( count++ ))doneecho $count
Note:
Difference between reverse quotation marks (') and $ () in Shell, shell quotation marks
Someone asked today:
Echo 'echo \\\\\\ W' echo $ (echo \\\\\\\ w) Why is the output different?
This leads to another problem: is there a difference between
Special variable IFS in shell
As I get used to the writing style of python, I often want to use bash to traverse the lines of a file and process the lines read.
But in a strange situation, if my text is similar to this
The first line.The second
The special variables IFS in shell, and the special variables IFS in shell
As I get used to the writing style of python, I often want to use bash to traverse the lines of a file and process the lines read.
But in a strange situation, if my text is
SHELL script-1, shell-1
.: Represents any character
*: Matches the preceding character. a * Indicates zero or multiple.
+: Match with the previous character to indicate one or more previous characters.
? : Matches with the previous character to
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