The following articles mainly tell you about the same results of the MySQL database. When we use different commands, there will be a very big difference. The following articles mainly compare the two MySQL commands, it can be said that the difference is extremely large. Take care of the IN clause!
- SELECT DISTINCT a.FamilyID,a.GenusID,a.SPID,a.FamilyName,a.CFamilyName,a.GenusName,a.CGenusName,a.LName,a.CName
- From IDents a,(select DISTINCT SPID from Photo Where FolderID='5bbb2ae0-a747-4f3c-afce-3ed39f784f56' AND LName!='') AS b
- Where a.SPID=b.SPID
Execution time: 0.0132 s
- SELECT DISTINCT a.FamilyID,a.GenusID,a.SPID,a.FamilyName,a.CFamilyName,a.GenusName,a.CGenusName,a.LName,a.CName
- From IDents a
- Where a.SPID IN
- (select DISTINCT SPID from Photo Where FolderID='5bbb2ae0-a747-4f3c-afce-3ed39f784f56' AND LName!='')
The execution time is 76.1623 s. The above content is the same result for the MySQL database. Using different commands is quite different from the two MySQL commands. The difference is a huge introduction. I hope you will gain some benefits.
The above content is the same result for the MySQL database. It is quite different to use different commands to compare the two MySQL commands. The difference is a huge description, and I hope it will help you in this regard.