diff options
Diffstat (limited to 'src/mintdb/plugin_mintdb_postgres.c')
-rw-r--r-- | src/mintdb/plugin_mintdb_postgres.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/mintdb/plugin_mintdb_postgres.c b/src/mintdb/plugin_mintdb_postgres.c index ac0fcb7e..163420b2 100644 --- a/src/mintdb/plugin_mintdb_postgres.c +++ b/src/mintdb/plugin_mintdb_postgres.c @@ -244,6 +244,9 @@ postgres_create_tables (void *cls, ",current_balance_curr VARCHAR("TALER_CURRENCY_LEN_STR") NOT NULL" ",expiration_date INT8 NOT NULL" ")"); + /* index on reserves table */ + SQLEXEC_INDEX ("CREATE INDEX reserves_reserve_pub_index ON " + "reserves (reserve_pub)"); /* reserves_in table collects the transactions which transfer funds into the reserve. The rows of this table correspond to each incoming transaction. */ @@ -404,6 +407,9 @@ postgres_create_tables (void *cls, ",coin_sig BYTEA NOT NULL CHECK (LENGTH(coin_sig)=64)" ",wire TEXT NOT NULL" ")"); + /* Index for get_deposit statement on coin_pub, transactiojn_id and merchant_pub */ + SQLEXEC_INDEX("CREATE INDEX deposits_coin_pub_index " + "ON deposits(coin_pub, transaction_id, merchant_pub)"); #undef SQLEXEC #undef SQLEXEC_INDEX |