My table took more space than itself on oracle

Hello experts,
I have terrible issue on couchbase 3.1.5 and 4.1.1, I have a table on oracle with 800GB and when i import it to couchbase , it grow 5 times bigger:scream:

P.S. the table on oracle is compressed.

how are you measuring the size? it isn’t unusual for JSON to take more space given the schema in our case is buried in the docs (each doc contains the JSON attributes). However we do compression that helps us be effective in a few spots. If you can tell me how the measurement is done, we can look for ways to optimize.
thanks
-cihan

many thanks for your reply,
in oracle, I find table space.
in couchbase, I only have one bucket in cluster and no replica, disk usage for this bucket grow to 500G for 20 days when the space for all data(180 days) in oracle is 800G.

Thanks

Hi if we are measuring disk space, I’d recommend using shorter names for JSON attributes.

The issue here is that databases were designed in an era where disk efficiency was critical to pack data into a single node. Couchbase is designed to make data access fast using distributed computing - the way utilize the HW is not purely based on optimizing disk based access. We utilize the parallel computing, large memory across multiple nodes and large number of cores across nodes etc.

Couchbase Also provide data management that is more flexible than “tables”. Tables can only store data that contains the columns you defined and require a change if you’d like to store more attributes (JSON and XML data in relational also require translation into tables before processing can be done). In JSON, we provide the full flexibility of being able to evolve your schema without the overhead of schema changes or without any translation between the app and the database (no ORMs - object <> relational mappings). That means even though things may have a larger footprint on disk, the access can be much faster because it is more efficient to access data without these translations.

My .02c is, not just looking at disk space to compare both environments. Disk is frankly fairly cheap so optimizing disk space may not be the best way to optimize your access. I’d evaluate the total package with utilization of multiple commodity nodes, cpu, memory and overall flexibility of the system when comparing Oracle to Couchbase Server.
thanks
-cihan

1 Like

Hi Mr.Chian,
excellent and many thanks,

[quote=“cihangirb, post:4, topic:8257”]
I’d recommend using shorter names for JSON attributes.
[/quote] you exactly mentioned issue.
as we do not have unique key in oracle table, then i had to use 55 bytes(combination of five columns) as id in json, but i did not know this meant more space than oracle.

[quote=“cihangirb, post:4, topic:8257”]
Couchbase is designed to make data access fast using distributed computing - the way utilize the HW is not purely based on optimizing disk based access. We utilize the parallel computing, large memory across multiple nodes and large number of cores across nodes etc.
[/quote] your explanation is complete.
also I got all of my info regarding this issue.

Thanks.