Add index
Connects to database