You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@servicecomb.apache.org by ni...@apache.org on 2018/08/10 01:55:46 UTC
[incubator-servicecomb-saga] branch master updated: SCB-829 Add
index on TxEvent(globalTxId) to improve performance (#246)
This is an automated email from the ASF dual-hosted git repository.
ningjiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-servicecomb-saga.git
The following commit(s) were added to refs/heads/master by this push:
new 0069792 SCB-829 Add index on TxEvent(globalTxId) to improve performance (#246)
0069792 is described below
commit 0069792dbffe6efaf6c172f51fac10af8da4c53e
Author: fcg <56...@qq.com>
AuthorDate: Fri Aug 10 09:55:44 2018 +0800
SCB-829 Add index on TxEvent(globalTxId) to improve performance (#246)
---
alpha/alpha-server/src/main/resources/schema-mysql.sql | 3 ++-
alpha/alpha-server/src/main/resources/schema-postgresql.sql | 1 +
2 files changed, 3 insertions(+), 1 deletion(-)
diff --git a/alpha/alpha-server/src/main/resources/schema-mysql.sql b/alpha/alpha-server/src/main/resources/schema-mysql.sql
index b159857..85522a7 100644
--- a/alpha/alpha-server/src/main/resources/schema-mysql.sql
+++ b/alpha/alpha-server/src/main/resources/schema-mysql.sql
@@ -30,7 +30,8 @@ CREATE TABLE IF NOT EXISTS TxEvent (
retries int(11) NOT NULL DEFAULT '0',
retryMethod varchar(256) DEFAULT NULL,
PRIMARY KEY (surrogateId),
- INDEX saga_events_index (surrogateId, globalTxId, localTxId, type, expiryTime)
+ INDEX saga_events_index (surrogateId, globalTxId, localTxId, type, expiryTime),
+ INDEX saga_global_tx_index (globalTxId)
) DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS Command (
diff --git a/alpha/alpha-server/src/main/resources/schema-postgresql.sql b/alpha/alpha-server/src/main/resources/schema-postgresql.sql
index b3f7702..bf8244b 100644
--- a/alpha/alpha-server/src/main/resources/schema-postgresql.sql
+++ b/alpha/alpha-server/src/main/resources/schema-postgresql.sql
@@ -32,6 +32,7 @@ CREATE TABLE IF NOT EXISTS TxEvent (
);
CREATE INDEX IF NOT EXISTS saga_events_index ON TxEvent (surrogateId, globalTxId, localTxId, type, expiryTime);
+CREATE INDEX IF NOT EXISTS saga_global_tx_index ON TxEvent (globalTxId);
CREATE TABLE IF NOT EXISTS Command (