Home > Backend Development > PHP Tutorial > MySQL Manual Version 5.0.20-MySQL Optimization (2) (1) (4)_PHP Tutorial

MySQL Manual Version 5.0.20-MySQL Optimization (2) (1) (4)_PHP Tutorial

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Release: 2016-07-13 17:03:16
Original
879 people have browsed it



The following example shows how to use the information provided by EXPLAIN to maximize the performance of multi-table joint queries.


Suppose you have the following SELECT statement and are planning to use EXPLAIN to detect it:


EXPLAIN SELECT tt.TicketNumber, tt.TimeIn,

tt.ProjectReference, tt.EstimatedShipDate,

tt.ActualShipDate, tt.ClientID,

tt.ServiceCodes, tt.RepetitiveID,

tt.CurrentProcess, tt.CurrentDPPerson,

tt.RecordVolume, tt.DPPrinted, et.COUNTRY,

et_1.COUNTRY, do.CUSTNAME

FROM tt, et, et AS et_1, do

WHERE tt.SubmitTime IS NULL

AND tt.ActualPC = et.EMPLOYID

AND tt.AssignedPC = et_1.EMPLOYID

AND tt. ClientID = do.CUSTNMBR;

In this example, first make the following assumptions:


The fields to be compared are defined as follows:

(t114)

www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/630970.htmlTechArticleThe following example shows how to use the information provided by EXPLAIN to maximize the performance of multi-table joint queries. Suppose you have the following SELECT statement and are planning to use EXPLAIN to detect it: ...
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Latest Issues
MySQL stops process
From 1970-01-01 08:00:00
0
0
0
Error when installing mysql on linux
From 1970-01-01 08:00:00
0
0
0
phpstudy cannot start mysql?
From 1970-01-01 08:00:00
0
0
0
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template