An example of optimizing a XXX real estate network

Source: Internet
Author: User
This is a piece of SQLselectid, title, and createdatefrom table name, orderbycreatedateasclimit334570, 10. I asked people over there to read the oldest news title and read 10 rows of data.

This is a piece of SQLselectid, title, and createdatefrom table name, orderbycreatedateasclimit334570, 10. I asked people over there to read the oldest news title and read 10 rows of data.

This is an SQL statement they developed

  • 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:

    The optimizer executes the following:

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

    Let's take a look at the SQL Execution:

    This is after optimization:

    The specific reason is that I will not make a shift here. For the U.S. server, please read the book (high-performance MySQL 2nd). below is the book:

    This article is from the "hechun's technical column" blog. The Hong Kong virtual host must be kept here.

    , Hong Kong Space

    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.