[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[taler-exchange] 02/02: -remove dead index, add comment on live index
From: |
gnunet |
Subject: |
[taler-exchange] 02/02: -remove dead index, add comment on live index |
Date: |
Tue, 17 Oct 2023 10:52:11 +0200 |
This is an automated email from the git hooks/post-receive script.
grothoff pushed a commit to branch master
in repository exchange.
commit 9294f3663712dbc60da1dc575278b47e9e56c6fa
Author: Christian Grothoff <grothoff@gnunet.org>
AuthorDate: Tue Oct 17 10:52:06 2023 +0200
-remove dead index, add comment on live index
---
src/exchangedb/0002-reserves_in.sql | 16 ++++++----------
.../pg_select_reserves_in_above_serial_id_by_account.c | 7 +++++--
2 files changed, 11 insertions(+), 12 deletions(-)
diff --git a/src/exchangedb/0002-reserves_in.sql
b/src/exchangedb/0002-reserves_in.sql
index 1dfc5db6..197a815b 100644
--- a/src/exchangedb/0002-reserves_in.sql
+++ b/src/exchangedb/0002-reserves_in.sql
@@ -83,22 +83,18 @@ BEGIN
'ON ' || table_name || ' '
'(reserve_in_serial_id);'
);
- -- FIXME: where do we need this index? Can we do better?
- EXECUTE FORMAT (
- 'CREATE INDEX ' || table_name ||
'_by_exch_accnt_section_execution_date_idx '
- 'ON ' || table_name || ' '
- '(exchange_account_section '
- ',execution_date'
- ');'
- );
- -- FIXME: where do we need this index? Can we do better?
EXECUTE FORMAT (
'CREATE INDEX ' || table_name || '_by_exch_accnt_reserve_in_serial_id_idx '
'ON ' || table_name || ' '
'(exchange_account_section'
- ',reserve_in_serial_id DESC'
+ ',reserve_in_serial_id ASC'
');'
);
+ EXECUTE FORMAT (
+ 'COMMENT ON INDEX ' || table_name ||
'_by_exch_accnt_reserve_in_serial_id_idx '
+ 'IS ' || quote_literal ('for
pg_select_reserves_in_above_serial_id_by_account') || ';'
+ );
+
END
$$;
diff --git a/src/exchangedb/pg_select_reserves_in_above_serial_id_by_account.c
b/src/exchangedb/pg_select_reserves_in_above_serial_id_by_account.c
index daedb3f8..1c7bc15a 100644
--- a/src/exchangedb/pg_select_reserves_in_above_serial_id_by_account.c
+++ b/src/exchangedb/pg_select_reserves_in_above_serial_id_by_account.c
@@ -24,6 +24,8 @@
#include "taler_pq_lib.h"
#include "pg_select_reserves_in_above_serial_id_by_account.h"
#include "pg_helper.h"
+
+
/**
* Closure for #reserves_in_serial_helper_cb().
*/
@@ -152,8 +154,9 @@ TEH_PG_select_reserves_in_above_serial_id_by_account (
" USING (reserve_pub)"
" JOIN wire_targets"
" ON (wire_source_h_payto = wire_target_h_payto)"
- " WHERE reserve_in_serial_id>=$1 AND exchange_account_section=$2"
- " ORDER BY reserve_in_serial_id;");
+ " WHERE reserve_in_serial_id>=$1"
+ " AND exchange_account_section=$2"
+ " ORDER BY reserve_in_serial_id ASC;");
qs = GNUNET_PQ_eval_prepared_multi_select (pg->conn,
"audit_reserves_in_get_transactions_incr_by_account",
params,
--
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.