<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: InsertCursor Performance in ArcObjects SDK Questions</title>
    <link>https://community.esri.com/t5/arcobjects-sdk-questions/insertcursor-performance/m-p/678536#M18173</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;Hi,&lt;BR /&gt;&lt;BR /&gt;I am running a check routine on a big (oracle based) SDE database (100K's of entries in dozends of tables) and create new Pointfeatures with some additional Field entries according to that check.&lt;BR /&gt;&lt;BR /&gt;I am using an InsertCursor for storing new features, because I've read that it can perform better than the FeaturClass.CreateFeature() / Feature.Store() aproach. However, it seems that my featureclass has some "complex" properties, as calling InsertCursor.InsertFeature() takes about 500 milliseconds for each point. Having to create about 30K Points, this results in a processing time of at least 6 hours, and that's just for storing the features, the check takes some time itself...&lt;BR /&gt;&lt;BR /&gt;Does anyone have an idea on how to speed up the process? Maybe a direct method of writing new Rows into the Featureclasses' Table might speed up the whole thing... I'm afraid I don't have much oracle know how, is there a simple way to accomplish such an insert operation with some c# code?&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;You could try an IFeatureBuffer.&amp;nbsp; After you create the FeatureClass, you can then set your IFeatureBuffer to this empty FC, as well as implement the IFeatureCursor.&amp;nbsp; You'd do something like the following (this is JUST a snipit from a larger set of code used to create and populate a new FeatureClass from an ADO.NET DataTable):&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;Dim pFeatCur As IFeatureCursor
Dim pFeatBuf As IFeatureBuffer
pFeatBuf = pFeatureClass.CreateFeatureBuffer
pFeatCur = pFeatureClass.Insert(True)

'*Add the new point
 tmpPoint = New ESRI.ArcGIS.Geometry.Point
 tmpPoint.PutCoords((CDec(row.Item("longitude"))), CDec(row.Item("latitude")))

 '*Set the new point to match Projected CoordSys of SDE FeatureClass'
pGeo = tmpPoint
pGeo.SpatialReference = pSpRefWGS
pGeo.Project(pSpRefNAD83)

'*Create a point
pGeo.SnapToSpatialReference()
pFeatBuf.Shape = pGeo
pFeatCur.InsertFeature(pFeatBuf)&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sun, 12 Dec 2021 04:36:12 GMT</pubDate>
    <dc:creator>JamesCrandall</dc:creator>
    <dc:date>2021-12-12T04:36:12Z</dc:date>
    <item>
      <title>InsertCursor Performance</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/insertcursor-performance/m-p/678535#M18172</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I am running a check routine on a big (oracle based) SDE database (100K's of entries in dozends of tables) and create new Pointfeatures with some additional Field entries according to that check.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I am using an InsertCursor for storing new features, because I've read that it can perform better than the FeaturClass.CreateFeature() / Feature.Store() aproach. However, it seems that my featureclass has some "complex" properties, as calling InsertCursor.InsertFeature() takes about 500 milliseconds for each point. Having to create about 30K Points, this results in a processing time of at least 6 hours, and that's just for storing the features, the check takes some time itself...&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Does anyone have an idea on how to speed up the process? Maybe a direct method of writing new Rows into the Featureclasses' Table might speed up the whole thing... I'm afraid I don't have much oracle know how, is there a simple way to accomplish such an insert operation with some c# code?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 16 Jun 2010 11:21:56 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/insertcursor-performance/m-p/678535#M18172</guid>
      <dc:creator>JanDuske</dc:creator>
      <dc:date>2010-06-16T11:21:56Z</dc:date>
    </item>
    <item>
      <title>Re: InsertCursor Performance</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/insertcursor-performance/m-p/678536#M18173</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;Hi,&lt;BR /&gt;&lt;BR /&gt;I am running a check routine on a big (oracle based) SDE database (100K's of entries in dozends of tables) and create new Pointfeatures with some additional Field entries according to that check.&lt;BR /&gt;&lt;BR /&gt;I am using an InsertCursor for storing new features, because I've read that it can perform better than the FeaturClass.CreateFeature() / Feature.Store() aproach. However, it seems that my featureclass has some "complex" properties, as calling InsertCursor.InsertFeature() takes about 500 milliseconds for each point. Having to create about 30K Points, this results in a processing time of at least 6 hours, and that's just for storing the features, the check takes some time itself...&lt;BR /&gt;&lt;BR /&gt;Does anyone have an idea on how to speed up the process? Maybe a direct method of writing new Rows into the Featureclasses' Table might speed up the whole thing... I'm afraid I don't have much oracle know how, is there a simple way to accomplish such an insert operation with some c# code?&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;You could try an IFeatureBuffer.&amp;nbsp; After you create the FeatureClass, you can then set your IFeatureBuffer to this empty FC, as well as implement the IFeatureCursor.&amp;nbsp; You'd do something like the following (this is JUST a snipit from a larger set of code used to create and populate a new FeatureClass from an ADO.NET DataTable):&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;Dim pFeatCur As IFeatureCursor
Dim pFeatBuf As IFeatureBuffer
pFeatBuf = pFeatureClass.CreateFeatureBuffer
pFeatCur = pFeatureClass.Insert(True)

'*Add the new point
 tmpPoint = New ESRI.ArcGIS.Geometry.Point
 tmpPoint.PutCoords((CDec(row.Item("longitude"))), CDec(row.Item("latitude")))

 '*Set the new point to match Projected CoordSys of SDE FeatureClass'
pGeo = tmpPoint
pGeo.SpatialReference = pSpRefWGS
pGeo.Project(pSpRefNAD83)

'*Create a point
pGeo.SnapToSpatialReference()
pFeatBuf.Shape = pGeo
pFeatCur.InsertFeature(pFeatBuf)&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 04:36:12 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/insertcursor-performance/m-p/678536#M18173</guid>
      <dc:creator>JamesCrandall</dc:creator>
      <dc:date>2021-12-12T04:36:12Z</dc:date>
    </item>
    <item>
      <title>Re: InsertCursor Performance</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/insertcursor-performance/m-p/678537#M18174</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I am already using a FeatureBuffer with an InsertCursor (didn't mention that directly, sorry). I think the problem is, that the Featureclass I am working with has some complex features, which forces the InsertFeature function to fall back on the slower CreateFeature / Store functions (as the documentation tells me). I have tried both methods, and they both need the same time for storing a new feature.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 16 Jun 2010 12:35:41 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/insertcursor-performance/m-p/678537#M18174</guid>
      <dc:creator>JanDuske</dc:creator>
      <dc:date>2010-06-16T12:35:41Z</dc:date>
    </item>
    <item>
      <title>Re: InsertCursor Performance</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/insertcursor-performance/m-p/678538#M18175</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Did you try using IFeatureClassWrite?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 16 Jun 2010 13:02:50 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/insertcursor-performance/m-p/678538#M18175</guid>
      <dc:creator>KirkKuykendall</dc:creator>
      <dc:date>2010-06-16T13:02:50Z</dc:date>
    </item>
    <item>
      <title>Re: InsertCursor Performance</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/insertcursor-performance/m-p/678539#M18176</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Sounds like you are doing a lot of things right from an ArcObjects stand point.&amp;nbsp; IFeatureClassWrite or ITableWrite sound like a good bet now.&amp;nbsp; Also you can try unversioning the featureclass if it is versioned.&amp;nbsp; That will avoid the SDE delta tables overhead.&amp;nbsp; If that is not an option, there is some tuning you can do on Oracle and SDE to make it faster, sounds like the bottle neck is AO though, not Oracle.&amp;nbsp; You could also consider using the SDE APIs (C or Java) for bulk loading to by pass ArcObjects all together.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 16 Jun 2010 13:13:30 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/insertcursor-performance/m-p/678539#M18176</guid>
      <dc:creator>AlexanderGray</dc:creator>
      <dc:date>2010-06-16T13:13:30Z</dc:date>
    </item>
    <item>
      <title>Re: InsertCursor Performance</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/insertcursor-performance/m-p/678540#M18177</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I've just tried the IFeatureClassWrite. Seems to be considerably faster indeed thanks for the hint!&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Although it looks like a good option, I am getting a "The requested operation is invalid on a closed state" Exception when calling StopEditing() or StopEditOperation() after everything is done. Do I have to do something else to prevent this? Seems like some mechanism is locking the table.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 16 Jun 2010 14:43:03 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/insertcursor-performance/m-p/678540#M18177</guid>
      <dc:creator>JanDuske</dc:creator>
      <dc:date>2010-06-16T14:43:03Z</dc:date>
    </item>
    <item>
      <title>Re: InsertCursor Performance</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/insertcursor-performance/m-p/678541#M18178</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Did you try using it in conjunction with IFeatureclassLoad and ISchemaLock?&lt;/SPAN&gt;&lt;BR /&gt;&lt;A href="http://edndoc.esri.com/arcobjects/9.2/ComponentHelp/esriGeoDatabase/IFeatureClassLoad_Example.htm"&gt;http://edndoc.esri.com/arcobjects/9.2/ComponentHelp/esriGeoDatabase/IFeatureClassLoad_Example.htm&lt;/A&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 16 Jun 2010 15:26:10 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/insertcursor-performance/m-p/678541#M18178</guid>
      <dc:creator>KirkKuykendall</dc:creator>
      <dc:date>2010-06-16T15:26:10Z</dc:date>
    </item>
    <item>
      <title>Re: InsertCursor Performance</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/insertcursor-performance/m-p/678542#M18179</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;After using an exclusive schema lock I don't get the error any longer, but the changes are not persisted either &lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt;&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 17 Jun 2010 06:03:29 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/insertcursor-performance/m-p/678542#M18179</guid>
      <dc:creator>JanDuske</dc:creator>
      <dc:date>2010-06-17T06:03:29Z</dc:date>
    </item>
  </channel>
</rss>

