[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[taler-exchange] branch master updated: add index on wire_targets - bett
From: |
gnunet |
Subject: |
[taler-exchange] branch master updated: add index on wire_targets - better performance on local db - many queries use wire_target_serial_id as join condition -> discussion use this as shard key? |
Date: |
Sat, 26 Feb 2022 17:38:00 +0100 |
This is an automated email from the git hooks/post-receive script.
marco-boss pushed a commit to branch master
in repository exchange.
The following commit(s) were added to refs/heads/master by this push:
new 99dd36f7 add index on wire_targets - better performance on local db -
many queries use wire_target_serial_id as join condition -> discussion use this
as shard key?
99dd36f7 is described below
commit 99dd36f7f6b22014ed671e661e6553ba7c41810b
Author: Marco Boss <bossm8@bfh.ch>
AuthorDate: Sat Feb 26 17:37:52 2022 +0100
add index on wire_targets
- better performance on local db
- many queries use wire_target_serial_id as join condition -> discussion
use this as shard key?
---
src/exchangedb/exchange-0001.sql | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/src/exchangedb/exchange-0001.sql b/src/exchangedb/exchange-0001.sql
index e8707fbf..184d62a7 100644
--- a/src/exchangedb/exchange-0001.sql
+++ b/src/exchangedb/exchange-0001.sql
@@ -88,6 +88,14 @@ CREATE TABLE IF NOT EXISTS wire_targets_default
PARTITION OF wire_targets
FOR VALUES WITH (MODULUS 1, REMAINDER 0);
+-- FIXME partition by serial_id rather than h_payto,
+-- it is used more in join conditions - crucial for sharding to select this.
+-- Author: (Boss Marco)
+CREATE INDEX IF NOT EXISTS wire_targets_serial_id_index
+ ON wire_targets
+ (wire_target_serial_id
+ );
+
CREATE TABLE IF NOT EXISTS reserves
(reserve_uuid BIGINT GENERATED BY DEFAULT AS IDENTITY
,reserve_pub BYTEA PRIMARY KEY CHECK(LENGTH(reserve_pub)=32)
--
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [taler-exchange] branch master updated: add index on wire_targets - better performance on local db - many queries use wire_target_serial_id as join condition -> discussion use this as shard key?,
gnunet <=