(1) The client sqlserver network interface uses a network protocol (shared memory can be: simple and high-speed, and the client and sqlserver are connected to the same computer by default; TCPIP: the most common protocol used to access sqlserver. The client specifies the IP address and port number to connect to sqlserver. The named pipe: The named pipe and the TCPIP protocol are in the architecture.
(1) The client sqlserver network interface uses a network protocol (which can be shared memory: simple and high-speed. The client and SQL server are connected in the same computer by default; TCP/IP: the most common protocol for accessing SQL server. The client specifies the IP address and port number to connect to SQL server. The named pipe: The named pipe and the TCP/IP protocol are in the architecture.
(1) The client sqlserver network interface uses a network protocol (which can be shared memory: simple and high-speed. The client and SQL server are connected in the same computer by default; TCP/IP: the most common protocol for accessing SQL server. The client specifies the IP address and port number to connect to SQL server. The named pipe: The named pipe and the TCP/IP protocol are similar in architecture, designed for LAN, the speed will be slower in the Wide Area Network. VIA: virtual interface adapter is a protocol that allows two systems to communicate with each other with high performance, both ends of the communication are required to use special hardware and dedicated connections) to establish a connection with the Service's SNI, and then create a connection through the network protocol connection and the TD port, in addition, this connection allows sqlserver to send the select statement in the form of a TDS message.
(2) SQL server SNI unpacks the TDS message, reads the select statement, and sends the SQL command to the command parser.
(3) The command parser checks whether a query plan matches the received statement and is available in the buffer pool's plan cache. If no query plan is found, the command parser generates a query tree based on the select statement, and then passes the query tree to the query optimizer to generate a query plan.
(4) because this query command is very simple, the query optimizer only generates a "zero overhead" query plan ("common query plan") in the pre-optimization stage "), the query optimizer sends the created query plan to the query executor for execution.
(5) When the query executor executes the query plan, it first determines the data to be read to complete the query plan, and then sends an access data request to the access method in the storage engine through the ole db interface.
(6) In order to complete the query executor request, the access method needs to read a data page from the database and require the buffer manager to provide this data page.
(7) The buffer manager checks whether the data page exists in the data cache. If the page does not exist in the data cache, the buffer manager first obtains the data page from the disk, then it is stored in the cache and sent back to the access method.
(8) Finally, the access method passes the result set to the relational engine, and the relational engine sends the result set to the client.