This is a very simplistic test, but I think it shows conclusively that Merge+Dissolve
is about 3 times quicker than Union+Dissolve
on this dataset, and I believe that as more complex data is thrown at it, the difference will only widen.
import arcpy,time
if arcpy.Exists("C:/temp/test.gdb"):
arcpy.Delete_management("C:/temp/test.gdb")
arcpy.CreateFileGDB_management("C:/temp","test.gdb")
arcpy.CreateFishnet_management("C:/temp/test.gdb/fishnet1","10 10","10 20","1","1","50","50","#","LABELS","0 0 75 75","POLYLINE")
arcpy.Buffer_analysis("C:/temp/test.gdb/fishnet1_label","C:/temp/test.gdb/fishnet1circles","0.51 Unknown","FULL","ROUND","NONE","#")
arcpy.CreateFishnet_management("C:/temp/test.gdb/fishnet2","10.1 10.1","10.1 20","1","1","50","50","#","LABELS","0 0 75 75","POLYLINE")
arcpy.Buffer_analysis("C:/temp/test.gdb/fishnet2_label","C:/temp/test.gdb/fishnet2circles","0.51 Unknown","FULL","ROUND","NONE","#")
start = time.clock()
arcpy.Merge_management("C:/temp/test.gdb/fishnet1circles;C:/temp/test.gdb/fishnet2circles","C:/temp/test.gdb/fishnetMerge","#")
elapsed = (time.clock() - start)
print("Merge took " + str(elapsed) + " seconds")
arcpy.Dissolve_management("C:/temp/test.gdb/fishnetMerge","C:/temp/test.gdb/fishnetMergeDissolve","#","#","MULTI_PART","DISSOLVE_LINES")
elapsed = (time.clock() - start)
print("Merge and Dissolve took " + str(elapsed) + " seconds")
start = time.clock()
arcpy.Union_analysis("C:/temp/test.gdb/fishnet1circles #;C:/temp/test.gdb/fishnet2circles #","C:/temp/test.gdb/fishnetUnion","ONLY_FID","#","GAPS")
elapsed = (time.clock() - start)
print("Union took " + str(elapsed) + " seconds")
arcpy.Dissolve_management("C:/temp/test.gdb/fishnetUnion","C:/temp/test.gdb/fishnetUnionDissolve","#","#","MULTI_PART","DISSOLVE_LINES")
elapsed = (time.clock() - start)
print("Union and Dissolve took " + str(elapsed) + " seconds")
I ran the test from IDLE using ArcGIS for Desktop 10.1 SP1 and Python 2.7.2 on Windows 7 SP1 and the results were:
>>>
Merge took 1.82999991257 seconds
Merge and Dissolve took 5.45186011302 seconds
Union took 7.6488681498 seconds
Union and Dissolve took 14.1194398165 seconds
>>>
As you suggested the Dissolve after Union was a bit quicker than the Dissolve after Merge but not enough to overcome the large gap between Merge and Union.
May be different reasons about why you can't merge them. Most of them can be deducted from the complete error message, not just the end part.
About the end part, it is just saying that you can find that log in the Log Messages panel (View ~> Panels ~> Log Messages), generally in the Proccesing Tab. But the text in the Log tab of the processing window is the same as the text logged in the Proccesing tab of the Log Messages panel.
For instance, check this Log:
QGIS version: 3.10.3-A Coruña
QGIS code revision: 0e1f846438
Qt version: 5.11.2
GDAL version: 3.0.4
GEOS version: 3.8.0-CAPI-1.13.1
PROJ version: Rel. 6.3.1, February 10th, 2020
Processing algorithm…
Algorithm 'Merge' starting…
Input parameters:
{ 'DATA_TYPE' : 5, 'EXTRA' : '', 'INPUT' : '', 'NODATA_INPUT' : None, 'NODATA_OUTPUT' : None, 'OPTIONS' : '', 'OUTPUT' : 'TEMPORARY_OUTPUT', 'PCT' : False, 'SEPARATE' : False }
GDAL command:
python3 -m gdal_merge -ot Float32 -of GTiff -o C:/Users/Gabriel/AppData/Local/Temp/processing_7b398423d55540609fc7426a5b406a0b/processing_ef4d9c14a2ca4bf08bd09c0d1c53d5e4/0dcfa065d9f440fcb971f60d43f55e01/OUTPUT.tif --optfile C:/Users/Gabriel/AppData/Local/Temp/processing_7b398423d55540609fc7426a5b406a0b/processing_ef4d9c14a2ca4bf08bd09c0d1c53d5e4/47fa46a83f0647018e0d6704bab4c501/mergeInputFiles.txt
GDAL command output:
No input files selected.
Usage: gdal_merge.py [-o out_filename] [-of out_format] [-co NAME=VALUE]*
[-ps pixelsize_x pixelsize_y] [-tap] [-separate] [-q] [-v] [-pct]
[-ul_lr ulx uly lrx lry] [-init "value [value...]"]
[-n nodata_value] [-a_nodata output_nodata_value]
[-ot datatype] [-createonly] input_files
[--help-general]
Execution completed in 0.43 seconds
Results:
{'OUTPUT': 'C:/Users/Gabriel/AppData/Local/Temp/processing_7b398423d55540609fc7426a5b406a0b/processing_ef4d9c14a2ca4bf08bd09c0d1c53d5e4/0dcfa065d9f440fcb971f60d43f55e01/OUTPUT.tif'}
Loading resulting layers
The following layers were not correctly generated.<ul><li>C:/Users/Gabriel/AppData/Local/Temp/processing_7b398423d55540609fc7426a5b406a0b/processing_ef4d9c14a2ca4bf08bd09c0d1c53d5e4/0dcfa065d9f440fcb971f60d43f55e01/OUTPUT.tif</li></ul>You can check the 'Log Messages Panel' in QGIS main window to find more information about the execution of the algorithm.
It have the same last part, but the error is described before, at:
GDAL command output:
No input files selected.
I have just opened the process and press Run without selecting any input layer ...
Best Answer
I have known this happen due to there being lots of files to merge and the folder and file tree names are long. Resolve by shortening the folder files names.
I have it happen for other currently unknown reasons too!