mirror of
https://github.com/Sonarr/Sonarr
synced 2025-01-03 21:56:06 +00:00
Added additional indexes to speed up DecisionMaker performance.
This commit is contained in:
parent
70afacee3f
commit
ff8eb0b67f
2 changed files with 25 additions and 0 deletions
|
@ -0,0 +1,24 @@
|
|||
using FluentMigrator;
|
||||
using NzbDrone.Core.Datastore.Migration.Framework;
|
||||
|
||||
namespace NzbDrone.Core.Datastore.Migration
|
||||
{
|
||||
[Migration(120)]
|
||||
public class update_series_episodes_history_indexes : NzbDroneMigrationBase
|
||||
{
|
||||
protected override void MainDbUpgrade()
|
||||
{
|
||||
Create.Index().OnTable("Series").OnColumn("TvdbId").Ascending();
|
||||
Create.Index().OnTable("Episodes").OnColumn("SeriesId").Ascending()
|
||||
.OnColumn("AirDate").Ascending();
|
||||
|
||||
Delete.Index().OnTable("History").OnColumn("EpisodeId");
|
||||
Create.Index().OnTable("History").OnColumn("EpisodeId").Ascending()
|
||||
.OnColumn("Date").Descending();
|
||||
|
||||
Delete.Index().OnTable("History").OnColumn("DownloadId");
|
||||
Create.Index().OnTable("History").OnColumn("DownloadId").Ascending()
|
||||
.OnColumn("Date").Descending();
|
||||
}
|
||||
}
|
||||
}
|
|
@ -224,6 +224,7 @@
|
|||
<Compile Include="Datastore\Migration\042_add_download_clients_table.cs" />
|
||||
<Compile Include="Datastore\Migration\043_convert_config_to_download_clients.cs" />
|
||||
<Compile Include="Datastore\Migration\044_fix_xbmc_episode_metadata.cs" />
|
||||
<Compile Include="Datastore\Migration\120_update_series_episodes_history_indexes.cs" />
|
||||
<Compile Include="Datastore\Migration\118_add_history_eventType_index.cs" />
|
||||
<Compile Include="Datastore\Migration\045_add_indexes.cs" />
|
||||
<Compile Include="Datastore\Migration\046_fix_nzb_su_url.cs" />
|
||||
|
|
Loading…
Reference in a new issue