mirror of
https://github.com/aljazceru/cyphernode.git
synced 2026-01-05 22:15:54 +01:00
Optimized db with new indexes, added rawtx db
This commit is contained in:
27
proxy_docker/app/data/rawtx.sql
Normal file
27
proxy_docker/app/data/rawtx.sql
Normal file
@@ -0,0 +1,27 @@
|
||||
PRAGMA foreign_keys = ON;
|
||||
|
||||
CREATE TABLE rawtx (
|
||||
id INTEGER PRIMARY KEY AUTOINCREMENT,
|
||||
txid TEXT UNIQUE,
|
||||
hash TEXT UNIQUE,
|
||||
confirmations INTEGER DEFAULT 0,
|
||||
timereceived INTEGER,
|
||||
fee REAL,
|
||||
size INTEGER,
|
||||
vsize INTEGER,
|
||||
is_replaceable INTEGER,
|
||||
blockhash TEXT,
|
||||
blockheight INTEGER,
|
||||
blocktime INTEGER,
|
||||
conf_target INTEGER,
|
||||
raw_tx TEXT,
|
||||
inserted_ts INTEGER DEFAULT CURRENT_TIMESTAMP
|
||||
);
|
||||
CREATE INDEX idx_rawtx_timereceived ON rawtx (timereceived);
|
||||
CREATE INDEX idx_rawtx_fee ON rawtx (fee);
|
||||
CREATE INDEX idx_rawtx_size ON rawtx (size);
|
||||
CREATE INDEX idx_rawtx_vsize ON rawtx (vsize);
|
||||
CREATE INDEX idx_rawtx_blockhash ON rawtx (blockhash);
|
||||
CREATE INDEX idx_rawtx_blockheight ON rawtx (blockheight);
|
||||
CREATE INDEX idx_rawtx_blocktime ON rawtx (blocktime);
|
||||
CREATE INDEX idx_rawtx_confirmations ON rawtx (confirmations);
|
||||
Reference in New Issue
Block a user