Improved performance of queries adding indexes (#7705)

This commit is contained in:
Sergio Navarro
2017-05-25 21:26:51 +02:00
committed by Sébastien Ros
parent 9f80897b91
commit f4e9393622

View File

@@ -239,6 +239,19 @@ namespace Orchard.Projections {
DisplayName = T("Body Part Text").Text,
Description = T("The text from the Body part").Text
});
SchemaBuilder.AlterTable("StringFieldIndexRecord", table => table
.CreateIndex("IDX_Orchard_Projections_StringFieldIndexRecord", "FieldIndexPartRecord_Id")
);
SchemaBuilder.AlterTable("IntegerFieldIndexRecord", table => table
.CreateIndex("IDX_Orchard_Projections_IntegerFieldIndexRecord", "FieldIndexPartRecord_Id")
);
SchemaBuilder.AlterTable("DoubleFieldIndexRecord", table => table
.CreateIndex("IDX_Orchard_Projections_DoubleFieldIndexRecord", "FieldIndexPartRecord_Id")
);
SchemaBuilder.AlterTable("DecimalFieldIndexRecord", table => table
.CreateIndex("IDX_Orchard_Projections_DecimalFieldIndexRecords", "FieldIndexPartRecord_Id")
);
return 1;
}
@@ -283,4 +296,4 @@ namespace Orchard.Projections {
return 4;
}
}
}
}