When using the Intersect_analysis tool and experimenting with different output options (fgdb, pgdb, shapefile) I observe some surprising results. The shapefile is much faster than either of the two gdb options, which really surprised me because the current dogma holds that the fgdb is faster across the board in everything. Does anyone have any experience with similar results? Are shapefiles really a faster vehicle for exporting data using a gp tool?
Here are the results for a single road feature class with 20 subtypes. I looped through the subtypes as though they were distinct layers (see example code snippet below) and perform an Intersect operation on each subtype with the result being 20 new featue classes/shapefiles. The total number of features exported in each case is 28,000. Each test was ran 4 times, so the results given are the average of the four runs per output type.
fgdb = 860 seconds
pgdb = 2101 seconds
shapefile = 323 seconds
for layer in listofLayers:
arcpy.Intersect_analysis([layer, selectingPolygon], outputName, "ALL", "#","INPUT")
So why is the shapefile output 2.5 times faster than file gdb?