laptop and a wrench

Erro

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

Última Publicação: August 25, 2014 ArcSDE/Enterprise Geodatabase
Número de ID do Erro NIM050922
EnviadoNovember 10, 2009
Última ModificaçãoJune 5, 2024
Aplica-se àArcSDE/Enterprise Geodatabase
Versão encontrada9.3.1
Idioma do programaAll
StatusWill Not Be Addressed

Informações Adicionais

No Public Explanation

Solução Provisória

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(); }

Etapas para Reproduzir

ID do Erro: NIM050922

Software:

  • ArcSDE/Enterprise Geodatabase

Seja notificado quando o status de um erro mudar

Baixe o Aplicativo de Suporte da Esri

Descubra mais sobre este tema

Obtenha ajuda de especialistas do ArcGIS

Entre em contato com Suporte Técnico

Baixe o Aplicativo de Suporte da Esri

Ir para as opções de download