MySQL Work flow

Source: Internet
Author: User

1.connector SQL Interactive language,php,java , etc.

2. System Management and control tools

3. connection pooling management buffering user connections, threading, etc. need for caching requirements

4.SQL Interface accepts Sql commands and returns query results

5. interpreter SQL command passed to parser for parsing and validation

The decomposition of SQL statements into a data structure the passing of statements is based on this structure

verifying The legality of SQL during parsing , parsing error does not continue parsing

6. Query optimizer

query optimization is performed before the SQL statement is parsed, (producing multiple execution plans, choosing the best)

7.cache and buffer Query cache query cache with hit query results to fetch data directly from the cache

This caching mechanism consists of a series of small caches For example, table cache key cache permission Cache

8.engine Storage Engine

A subsystem that deals with files and where data is stored and retrieved. plug-in type

the file access mechanism

9. databases are generally called by other programming languages via SQL ,andMySQL processes and returns results

The first interaction is through connector , and the request is staged connection pool managed by manager

after the request enters the processing queue from the wait queue, the manager drops the request to the SQL interface

After the SQL interface receives the request, it hashes and compares with the cached result process, and returns the result by matching

otherwise thrown to the interpreter -"parsing data structure validation SQL legal -" Optimizer optimization query plan -" Give the storage engine to the disk to get the data back to the program

10. Cache Query Data

when the storage engine finishes processing the data back to the program, it also retains a copy of the data to the cache to process the next same request

EXECUTE statement + execution result -"hash saved to cache "

11.cache and buffer differences

Buffer is a write cache and the cache is read cached

MySQL Work flow

Contact Us

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

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.