Commit b460179c authored by Mike Sheldon's avatar Mike Sheldon

Create indexes by default when installing

parent 5aa96989
......@@ -371,16 +371,15 @@ if (isset($_POST['install'])) {
}
}
// uncomment these to solve performance problems with getRecentScrobbles
// $adodb->Execute("CREATE INDEX album_artistname_idx ON Album(artist_name)");
// $adodb->Execute("CREATE INDEX scrobbles_artist_idx ON Scrobbles(artist)");
// $adodb->Execute("CREATE INDEX scrobbles_time_idx ON Scrobbles(time)");
// $adodb->Execute("CREATE INDEX track_artist_idx ON Track(lower(artist_name))");
// $adodb->Execute("CREATE INDEX track_name_idx ON Track(lower(name))");
// $adodb->Execute("CREATE INDEX track_streamable_idx on Track(streamable);");
// $adodb->Execute("CREATE INDEX scrobbles_artist_idx on Scrobbles(lower(artist))");
// $adodb->Execute("CREATE INDEX scrobbles_track_idx on Scrobbles(lower(track))");
// $adodb->Execute("CREATE UNIQE INDEX groups_groupname_idx ON Groups(lower(groupname))");
$adodb->Execute("CREATE INDEX album_artistname_idx ON Album(artist_name)");
$adodb->Execute("CREATE INDEX scrobbles_artist_idx ON Scrobbles(artist)");
$adodb->Execute("CREATE INDEX scrobbles_time_idx ON Scrobbles(time)");
$adodb->Execute("CREATE INDEX track_artist_idx ON Track(lower(artist_name))");
$adodb->Execute("CREATE INDEX track_name_idx ON Track(lower(name))");
$adodb->Execute("CREATE INDEX track_streamable_idx on Track(streamable);");
$adodb->Execute("CREATE INDEX scrobbles_artist_idx on Scrobbles(lower(artist))");
$adodb->Execute("CREATE INDEX scrobbles_track_idx on Scrobbles(lower(track))");
$adodb->Execute("CREATE UNIQE INDEX groups_groupname_idx ON Groups(lower(groupname))");
// uncomment these if you're using postgresql and want to run the software as www-data
// $adodb->Execute("GRANT SELECT, UPDATE, INSERT, DELETE ON TABLE Album, Artist, Auth, ClientCodes, Delete_Request, Error, Invitation_Request, Invitations, Now_Playing, Places, Radio_Sessions, Scrobble_Sessions, Scrobbles, Scrobble_Track, Similar_Artist, Tags, Track, Users, User_Relationships, User_Relationship_Flags to \"www-data\"");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment