What are the pros and cons of using in_memory vs scratch workspace?

01-18-2019 09:20 AM
Occasional Contributor


I've got a general question about what are the recommended use cases when deciding to use in_memory vs scratch workspace/folder/GDB for intermediate (i.e. temp) data in a Python script.  I've searched and the only real answers I have seen indicate that a scratch GDB will let you take advantage of more GDB features and that you have to explicitly delete your temp data in the scratch GDB.

So, when would I want my script to use in_memory vs scratch workspace?  Is there a difference in terms of performance and memory resources?  Are there different recommendations when dealing with Desktop, Pro, and Server?



0 Kudos
2 Replies
MVP Legendary Contributor

In ArcGIS Pro 2.3, in_memory has been changed and improved.  The online help isn't available until the release is made out … very soon... but I would

Currently the help shows...

Considerations when using the in_memory workspace—Appendices | ArcGIS Desktop 

The in_memory workspace—ArcGIS Pro | ArcGIS Desktop 

and currently some tools don't support it

000260: Failed to copy into .—Help | ArcGIS Desktop 

Check those links when 2.3 is released

Occasional Contributor

Thank you Dan Patterson‌.  Those links are helpful.

0 Kudos