laptop and a wrench

Error

Noticeable slowdown while retrieving a feature using IFeatureClass.GetFeature() from a versioned data rather than from a non-versioned data.

Última publicación: August 25, 2014 ArcSDE/Enterprise Geodatabase
Número de ID del error NIM050922
EnviadoNovember 10, 2009
Última modificaciónJune 5, 2024
Relacionado conArcSDE/Enterprise Geodatabase
Versión encontrada9.3.1
Lenguaje del programaAll
EstadoWill Not Be Addressed

Información adicional

No Public Explanation

Solución alternativa

Suggested to use IGeodatabsebridge::Getfeatures to get a featurecursor instead of IfeatureClass.getfeature(), which run much faster In both versioned and in non-versioned data. But User was not able to implement this suggestion in his code because it will be affecting his production code.Code suggested:private static void TestGetFeature4() { int[] ids = new int[NUM_TRIALS]; int id = 1; for (int i = 0; i < NUM_TRIALS; i++) { ids[i] = id + i; } IWorkspaceFactory workspaceFactory = new SdeWorkspaceFactory(); IFeatureWorkspace ws = (IFeatureWorkspace)workspaceFactory.OpenFromFile(GEODATABASE_PATH, Win32.GetDesktopWindow()); Console.WriteLine("Opened SDE Geodatbase"); IFeatureClass featureClass = ws.OpenFeatureClass("sde.SDE.USPlaces_Ver"); Int16 featurecount = (short)featureClass.FeatureCount(null); Console.WriteLine("Got " + featureClass.AliasName + " With " + featurecount.ToString() + " features"); IGeoDatabaseBridge2 gdbHelp = new GeoDatabaseHelperClass(); IFeatureCursor fcur = gdbHelp.GetFeatures(featureClass, ref ids, true); long totalTime = 0; Int64 start = Environment.TickCount; IFeature feat = fcur.NextFeature(); totalTime += (Environment.TickCount - start); while (feat != null) { System.Diagnostics.Debug.WriteLine(feat.OID); start = Environment.TickCount; feat = fcur.NextFeature(); totalTime += (Environment.TickCount - start); } Console.WriteLine("total time in Miliseconds: " + totalTime); double avgTime = (double)totalTime / (double)NUM_TRIALS; Console.WriteLine("average time in Miliseconds: " + avgTime); Int32 count = Console.Read(); }

Pasos para reproducir

ID del error: NIM050922

Software:

  • ArcSDE/Enterprise Geodatabase

Recibir notificaciones cuando cambie el estado de un error

Descargar la aplicación de soporte de Esri

Descubrir más sobre este tema

Obtener ayuda de expertos en ArcGIS

Contactar con el soporte técnico

Descargar la aplicación de soporte de Esri

Ir a opciones de descarga