Author

Topic: What advantages does using LevelDB offer? (Read 1422 times)

newbie
Activity: 6
Merit: 1
August 21, 2014, 01:25:12 AM
#5
Thanks for all your replies, I have a clearer picture now.  Smiley
member
Activity: 96
Merit: 10
esotericnonsense
August 20, 2014, 03:47:06 PM
#4
The UXTO db as implemented stores unspent outputs, serialized, keyed by txid.

That's it. Want to know if a txid has unspent outputs? Look in the DB and deserialize the information.

Nothing more advanced than that is really required.
full member
Activity: 136
Merit: 120
August 20, 2014, 02:59:32 PM
#3
What are the advantages? Why was it implemented?
I've used LevelDB, H2, Firebird and PostgreSQL with my JavaBitcoin node.  LevelDB wins hands-down on both performance and database size.  It is ideal for a bitcoin database where you have a small number of keys (usually just the transaction or block hash) and don't need the complexity of the SQL SELECT statement.  It is easy to implement a secondary index (such as block height->block) using a separate map.

Ron
legendary
Activity: 1890
Merit: 1086
Ian Knowles - CIYAM Lead Developer
August 20, 2014, 01:09:56 PM
#2
When you are dealing with data that is mostly *binary* in nature a SQL DB doesn't really offer much advantage over a DB that is more "object based".

Basically you end up having to do *more work* with a SQL DB than a non-SQL DB to store/retrieve the records - so if you don't need SQL then it is actually going to be *faster* to not use it.

Understand that the *simplest* way to do things will always be the *fastest*.
newbie
Activity: 6
Merit: 1
August 20, 2014, 01:06:41 PM
#1
What are the advantages? Why was it implemented?

 Huh
Jump to: