aboutsummaryrefslogtreecommitdiff
path: root/src/exchangedb/plugin_exchangedb_postgres.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2021-11-27 14:56:22 +0100
committerChristian Grothoff <christian@grothoff.org>2021-11-27 14:56:28 +0100
commite46fb309654b82b596a2e5613dcc1c74af4366c0 (patch)
tree2273546b9cc4f262193ef7cdc831f650d62c77e6 /src/exchangedb/plugin_exchangedb_postgres.c
parent6ee13445cee3909d23b8ff3162f465835e89a2ce (diff)
refactor get_ready_deposits query and index to hopefully make query faster
Diffstat (limited to 'src/exchangedb/plugin_exchangedb_postgres.c')
-rw-r--r--src/exchangedb/plugin_exchangedb_postgres.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/exchangedb/plugin_exchangedb_postgres.c b/src/exchangedb/plugin_exchangedb_postgres.c
index 2c863a32..3591470e 100644
--- a/src/exchangedb/plugin_exchangedb_postgres.c
+++ b/src/exchangedb/plugin_exchangedb_postgres.c
@@ -1105,11 +1105,11 @@ prepare_statements (struct PostgresClosure *pg)
" WHERE "
" shard >= $2"
" AND shard <= $3"
+ " AND wire_deadline<=$1"
+ " AND refund_deadline<$1"
" AND tiny=FALSE"
" AND done=FALSE"
" AND (kyc_ok OR $4)"
- " AND wire_deadline<=$1"
- " AND refund_deadline<$1"
" ORDER BY "
" shard ASC"
" ,wire_deadline ASC"