I have a layer that is created by a python script that is used in portal and map service. It is in a SDE database and the script deletes all the features and then appends the new features that are created by the script. The issues that I am having is that the more and more I run the script it seems as the feature class/layer gets slower. For example if I try to preview the feature class in ArcCatalog it takes a long time to display the feature class, longer than it should. The same goes for the map service, this feature class in a Map Service. The a query from this map service takes a long time. What is the issue? Is there a better way to delete features and append features?