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

1162
2
01-18-2019 09:20 AM
RyanDavis1
Occasional Contributor

Hello,

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?

Thanks,

Ryan

0 Kudos
2 Replies
DanPatterson_Retired
MVP Emeritus

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

RyanDavis1
Occasional Contributor

Thank you Dan Patterson‌.  Those links are helpful.

0 Kudos