Drop Id column for shares table
Add index on table balance_changes
CREATE TABLE shares
(
- id BIGSERIAL NOT NULL PRIMARY KEY,
poolid TEXT NOT NULL,
blockheight BIGINT NOT NULL,
difficulty DOUBLE PRECISION NOT NULL,
@@ -60,6 +59,8 @@ CREATE TABLE balance_changes
created TIMESTAMP NOT NULL
);
+CREATE INDEX IDX_BALANCE_CHANGES_POOL_ADDRESS_CREATED on balance_changes(poolid, miner, created desc);
+
CREATE TABLE payments
(
id BIGSERIAL NOT NULL PRIMARY KEY,
