Removing hyphens will save you exactly 4 characters per line in the database, which is actually not worth the effort. Due to these four characters, Oracle will not be much slower or faster. Worse, if you want to select the value back into your Java application and recreate the java.util.UUID object, you need to insert the hyphens again in the right place.
If you want to keep a small amount of memory in the database, RAW(16) (like the vcsjones mentioned in the comment on your question) will have a minimum size. However, if you want to use the RAW type, you need to parse the UUIDs into a byte[] array. This is a bit complicated since java.util.UUID only returns a String representation or two long values. Recovering a UUID from a byte[] array is even more difficult.
Stefan ferstl
source share