Bitcoin Forum
September 27, 2018, 09:58:06 PM *
News: ♦♦ New info! Bitcoin Core users absolutely must upgrade to previously-announced 0.16.3 [Torrent]. All Bitcoin users should temporarily trust confirmations slightly less. More info.
 
   Home   Help Search Donate Login Register  
Pages: [1]
  Print  
Author Topic: What advantages does using LevelDB offer?  (Read 1309 times)
FPoBA
Newbie
*
Offline Offline

Activity: 6
Merit: 0


View Profile
August 20, 2014, 06:06:41 PM
 #1

What are the advantages? Why was it implemented?

 Huh
1538085486
Hero Member
*
Offline Offline

Posts: 1538085486

View Profile Personal Message (Offline)

Ignore
1538085486
Reply with quote  #2

1538085486
Report to moderator
1538085486
Hero Member
*
Offline Offline

Posts: 1538085486

View Profile Personal Message (Offline)

Ignore
1538085486
Reply with quote  #2

1538085486
Report to moderator
1538085486
Hero Member
*
Offline Offline

Posts: 1538085486

View Profile Personal Message (Offline)

Ignore
1538085486
Reply with quote  #2

1538085486
Report to moderator
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction. Advertise here.
1538085486
Hero Member
*
Offline Offline

Posts: 1538085486

View Profile Personal Message (Offline)

Ignore
1538085486
Reply with quote  #2

1538085486
Report to moderator
CIYAM
Legendary
*
Offline Offline

Activity: 1876
Merit: 1000


Ian Knowles - CIYAM Lead Developer


View Profile WWW
August 20, 2014, 06: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*.

With CIYAM anyone can create 100% generated C++ web applications in literally minutes.

GPG Public Key | 1ciyam3htJit1feGa26p2wQ4aw6KFTejU
ScripterRon
Full Member
***
Offline Offline

Activity: 136
Merit: 106


View Profile
August 20, 2014, 07: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
azeteki
Member
**
Offline Offline

Activity: 96
Merit: 10

esotericnonsense


View Profile WWW
August 20, 2014, 08: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.

FPoBA
Newbie
*
Offline Offline

Activity: 6
Merit: 0


View Profile
August 21, 2014, 06:25:12 AM
 #5

Thanks for all your replies, I have a clearer picture now.  Smiley
Pages: [1]
  Print  
 
Jump to:  

Sponsored by , a Bitcoin-accepting VPN.
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!