Re:Show HN: Pg_blkchain – Postgres blockchain extension
by AnkhMorporkian on Saturday October 21, 2017 @03:35PM
(#15523232)
I'm curious, why wouldn't sqlite cut it? Granted, I'm not a blockchain afficiando, but I have several sqlite DBs that run a couple hundred gigabytes a piece that work quite well.
[ Parent
| on HN ]
Re:Show HN: Pg_blkchain – Postgres blockchain extension
by gtrubetskoy on Saturday October 21, 2017 @09:23PM
(#15524600)
SQLite would cut it just fine. Though it would also need an extension like this one, if you'd want the signature verification and hashing to happen inside SQLite.
The difference between SQLite and Postgres would be that more than one client can connect over the network to PG (or most any other sql db out there really), while SQLite is meant to be embedded, which, if you already have LevelDB working (as is the case in Bitcoin Core), wouldn't be all that different.
Re:Show HN: Pg_blkchain – Postgres blockchain extension
by comboy on Saturday October 21, 2017 @03:51PM
(#15523306)
I said probably because I thought about it myself while writing that comment. I also have good experience with it, but if sqlite only talks SQL then just creating string representation of binaries would already be prohibitive.
Re:Show HN: Pg_blkchain – Postgres blockchain extension
by ComputerGuru on Saturday October 21, 2017 @10:05PM
(#15524754)
> but if sqlite only talks SQL
What does that mean? Like any RDBMS, SQLite is interfaced with in SQL, but can store and process binary data just fine.
Re:Show HN: Pg_blkchain – Postgres blockchain extension
by comboy on Sunday October 22, 2017 @03:15AM
(#15525581)
I mean that you need to serialize binary just to make an SQL statement that includes it, and that's very expensive. E.g. postgresql's COPY supports binary format which allows you to avoid that.
Re:Show HN: Pg_blkchain – Postgres blockchain extension
by ComputerGuru on Sunday October 22, 2017 @12:29PM
(#15527544)
The fact that SQLite is embedded means it can take full advantage of pointer passing. I don't think it serializes anything when you bind parameters to a blob.