Exercises


Q1:

Which of the following queries on the employee database would use indexes? (You can check Chapter 4, "Creating Databases, Tables, and Indexes," for the exact structure of the database. Or, if you have it installed, use describe to see which columns are indexed.)

a)

 
 select * from employee where departmentID=128; 

b)

 
 select employeeID from assignment where clientID=1; 

c)

 
 select skill, count(skill) from employeeSkills group by skill; 

If these three queries were going to be run frequently, what additional indexes would you create?




MySQL Tutorial
MySQL Tutorial
ISBN: 0672325845
EAN: 2147483647
Year: 2003
Pages: 261

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net