As a beginner in PL/SQL I have a problem with understanding of the minimum size of Oracle LOBs. There is a lot of contradictory information in the Internet, including the official documentation of Oracle itself... As far as I understand, a LOB does not consume the whole space of 4gb if it has less data, but is there a minimum? For instance, how much space would take a LOB if it contains only one character? Thank you so much in advance!
PS. I have read really a lot of Oracle documentation and forums, but I have found only some unclear mentions of chunks, while the minimum size of one chunk is not specified as well. If LOBs do not have a minimum size, is there any problem (related to memory consumption) with using them as a universal datatype instead of others?
The minimum chunk size is the block size of the tablespace. This means that if you store a bunch of 5KB values (and therefore have to use LOBs) and your block size is 16KB, each value wastes 11KB of space, consuming 3x more space than actually needed. For this reason, in a LOB-heavy environment, a block size no larger than 8KB is recommended.
However, LOBs by default are stored in-row, in the primary data block with the rest of the row's data, unless they exceed a length threshhold (a bit less than 4KB) at which point they are stored out of row in their own dedicated segment with the minimum allocation a chunk, which defaults (and cannot be less than) your block size (e.g. 8K, 16K, etc.). But chunks play no part of in-row storage.
A one character LOB will be in-row and there the minimum size (as seen by examining a block dump) is 33 bytes (32 bytes of inline LOB column overhead plus 1 byte for a single ASCII character).
But don't let this convince you to use LOBs where they aren't needed. If the text you intend to store won't exceed 4KB, don't use LOBs - they complicate and slow down fetching and other processing compared to varchar2
(vastly so over a network), even if it is in-row storage (because your client doesn't know that and has to make special calls to retrieve it piece-meal).
There are many useful functions that do not support LOBs. LOBs cannot be used in joins. LOBs also cannot be indexed, which severely restricts their utility. They are meant primarily for lengthy unstructured text to be read by humans rather than worked with programmatically.
So do not use them as a "universal datatype". In fact, you shouldn't be trying to find any type to use universally. Oracle is intended to by strongly typed, selecting the types and scale/precision/length limits that make sense for the data intended for each column. Any one-size-fits-all approach will run into a host of problems.