An example of optimizing a XXX real estate network

Source: Internet
Author: User

This is an SQL statement they developed

 
 
  1. Select id, title, createdate from table name order by createdate asc limit 334570,10;

The person who asked this question meant reading the oldest news title and reading 10 records from 334570 rows of data.

The index information is as follows:

650) this. width = 650; "border =" 0 "src =" http://www.bkjia.com/uploads/allimg/131229/1S3524241-0.jpg "alt =" "/>

The optimizer executes the following:

650) this. width = 650; "border =" 0 "src =" http://www.bkjia.com/uploads/allimg/131229/1S3523517-1.jpg "alt =" "/>

This reminds me of an optimization case of the second High-Performance edition.

Let's take a look at the SQL Execution:

650) this. width = 650; "border =" 0 "src =" http://www.bkjia.com/uploads/allimg/131229/1S3522151-2.jpg "alt =" "/>

This is after optimization:

650) this. width = 650; "border =" 0 "src =" http://www.bkjia.com/uploads/allimg/131229/1S352F64-3.jpg "alt =" "/>

The specific reason is that I will not make a shift here. Please read the high-performance MySQL 2nd version. below is the description in the book:

650) this. width = 650; "border =" 0 "src =" http://www.bkjia.com/uploads/allimg/131229/1S3524255-4.jpg "alt =" "/> 650) this. width = 650; "border =" 0 "src =" http://www.bkjia.com/uploads/allimg/131229/1S35251J-5.jpg "alt =" "/>

 

This article is from the "hechun's technical column" blog, please be sure to keep this source http://hcymysql.blog.51cto.com/5223301/1123388

Related Article

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.