SQL Optimization-logical Optimization-external connections, nested connections, and elimination of connections, SQL nesting
1) eliminate external connections
① External connection Introduction
1) left join/left outer join: LEFT OUTER JOIN
The result set of left outer Join includes all rows in the LEFT tabl
MySQL View details of all current connections:Mysqladmin-u root-p ProcesslistMySQL view current number of connections (threads is the number of connections)Mysqladmin-u root-p Statusuptime:1047464 threads:22 questions:1494780 Slow queries:0 opens:31357 Flush tables:1 Open tables:1981 Queri Es per second avg:1.427MySQL shows which threads are runningList only the first 100: show Processlist;All listed: Show
We often use joint queries for two tables. Sometimes we use internal connections, full connections, and left and right connections. Is it very complicated? The following is a demonstration of their differences.
First, there are two tables:
CREATETABLEweather
(
citycharactervarying(80)NOTNULL,
temp_lointegerNOTNULL,
temp_hiintegerNOTNULL,
prcpr
on the connection condition using (department_id), but department_id = 40
There is no matching record in the Employees table. It is common sense that the record corresponding to department_id = 40 will be thrown.
However, to save all records in the connector tables
A matched record is used to save all records of the connected table. Of course, the value of this virtual record is null.
--------------------------Natural join-----------------------------
SQL> select * from employees
in the data, three times after the handshake, the client and the server began to transfer data officially. Ideally, once a TCP connection is established, the TCP connection is maintained until either side of the communication actively closes the connection. When disconnected, both the server and the client can initiate a request to disconnect the TCP connection, and the disconnect process requires a "four handshake" (the process is not fine, that is, the server and client interaction, the final
are as follows: Watermark/2/text/ahr0cdovl2jsb2cuy3nkbi5uzxqv/font/5a6l5l2t/fontsize/400/fill/i0jbqkfcma==/dissolve/70/gravity /center "> conditionalDescription: The unconditional results found above are filtered according to the conditions but here only can be used to indicate that you cannot use on the results are as follows: Summary The phrase is given to himself and to all the readers:In the future, understand a piece of things will be its ins and outs, and to summarize, so that the futu
TESTC C on (A.A=C.A);The results table is as follows:Three, outer connection:1. Left Outer connection outer JOIN or Ieft JoinThe left OUTER join is the addition of unmatched data from the primary table on the basis of the equivalent connection, for example:Notation One: SELECT * from TESTA a left OUTER JOIN TESTC C on (A.A=C.A);Notation Two: SELECT * from TESTA a left JOIN TESTC C on (A.A=C.A);Oracle-specific notation: SELECT * from TESTA A,TESTC C WHERE a.a=c.a (+);The results table is as foll
HTTP persistent connections and short connections are essentially TCP persistent connections and short connections. HTTP belongs to the application layer protocol and uses TCP protocol at the transport layer. 1. relationship between HTTP protocol and TCP/IP protocol
HTTP persistent
0. TCP/IPTCP/IP is a protocol group that can be divided into three levels: Network layer, Transport layer and application layer.At the network layer are IP protocols, ICMP protocols, ARP protocols, RARP protocols, and BOOTP protocols.There are TCP protocols and UDP protocols in the transport layer.At the application level: TCP includes FTP, HTTP, TELNET, SMTP, and other protocolsUDP includes DNS, TFTP, and other protocols1. The relationship between the HTTP protocol and the TCP/IP protocolLong
Original: https://www.cnblogs.com/gotodsp/p/6366163.html1. The relationship between the HTTP protocol and the TCP/IP protocol
Long connections and short connections to HTTP are essentially TCP long connections and short connections. HTTP belongs to the Application layer protocol, which uses the TCP protocol at
http long connections and short connections
1. The relationship between the HTTP protocol and the TCP/IP protocol
Long connections and short connections to HTTP are essentially TCP long connections and short connections. HTTP bel
1.number of IIS connections
Generally purchased virtual host friends are familiar with the purchase, will limit the number of IIS connections, as the name implies that the IIS server can accommodate the maximum number of connections requested by the client, should be called "IIS limit the number of connections."
Linux configuration supports high concurrent TCP connections (socket maximum number of connections)Linux configuration supports high concurrent TCP connections (socket maximum number of connections) and optimized kernel parameters2011-08-09 15:20:58|Category: lnmplamp| Tags: kernel tuning file system tuning high concur
1. The relationship between the HTTP protocol and the TCP/IP protocolLong connections and short connections to HTTP are essentially TCP long connections and short connections. HTTP belongs to the Application layer protocol, which uses the TCP protocol at the Transport Layer and IP protocol at the network layer. The IP
1. The relationship between the HTTP protocol and the TCP/IP protocolLong connections and short connections to HTTP are essentially TCP long connections and short connections. HTTP belongs to the Application layer protocol, which uses the TCP protocol at the Transport Layer and IP protocol at the network layer. The IP
This article transferred from: http://www.cnblogs.com/0201zcr/p/4694945.html1. The relationship between the HTTP protocol and the TCP/IP protocolLong connections and short connections to HTTP are essentially TCP long connections and short connections. HTTP belongs to the Application layer protocol, which uses the TCP p
1. The relationship between the HTTP protocol and the TCP/IP protocolLong connections and short connections to HTTP are essentially TCP long connections and short connections. HTTP belongs to the Application layer protocol, which uses the TCP protocol at the Transport Layer and IP protocol at the network layer. The IP
General purchase of virtual host friends are familiar with the purchase, will limit the number of IIS connections, this side first from the general do not understand the code user perspective of IIS connectionsAs the name implies, the maximum number of connections that the IIS server can hold for a client request, which is exactly the number of "IIS Restricted connectio
TCP/IPTCP/IP is a protocol group that can be divided into three levels: Network layer, Transport layer and application layer.At the network layer are IP protocols, ICMP protocols, ARP protocols, RARP protocols, and BOOTP protocols.There are TCP protocols and UDP protocols in the transport layer.At the application level: TCP includes FTP, HTTP, TELNET, SMTP, and other protocolsUDP includes DNS, TFTP, and other protocolsShort ConnectionConnection, transfer data, close connectionHTTP is stateless,
1. The relationship between HTTP protocol and TCP/IP protocol
Long and short connections of HTTP are essentially TCP long connections and short connections. HTTP belongs to the Application layer protocol, using IP protocol at the network layer, mainly solves the network routing and addressing problem, uses the TCP protocol in the transport layer, mainly solves ho
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.