mirror of
https://github.com/documize/community.git
synced 2025-07-18 20:59:43 +02:00
Add covering indexes to support super-size deployments
Resolves issues for enterprise customers with tonnes of data in these SQL tables: - dmz_doc - dmz_section Multi-tenant compliant.
This commit is contained in:
parent
74300b009b
commit
6629d76453
7 changed files with 1116 additions and 1061 deletions
5
core/database/scripts/mysql/db_00031.sql
Normal file
5
core/database/scripts/mysql/db_00031.sql
Normal file
|
@ -0,0 +1,5 @@
|
|||
/* Community edition */
|
||||
|
||||
-- Indexes to improve performance
|
||||
CREATE UNIQUE INDEX idx_doc_4 ON dmz_doc(c_orgid,c_refid);
|
||||
CREATE UNIQUE INDEX idx_section_4 ON dmz_section(c_orgid,c_refid);
|
5
core/database/scripts/postgresql/db_00007.sql
Normal file
5
core/database/scripts/postgresql/db_00007.sql
Normal file
|
@ -0,0 +1,5 @@
|
|||
/* Community edition */
|
||||
|
||||
-- Indexes to improve performance
|
||||
CREATE UNIQUE INDEX idx_doc_4 ON dmz_doc (c_orgid,c_refid);
|
||||
CREATE UNIQUE INDEX idx_section_4 ON dmz_section (c_orgid,c_refid);
|
3
core/env/runtime.go
vendored
3
core/env/runtime.go
vendored
|
@ -44,8 +44,7 @@ type Runtime struct {
|
|||
Product domain.Product
|
||||
}
|
||||
|
||||
// StartTx beings database transaction with application defined
|
||||
// database transaction isolation level.
|
||||
// StartTx begins database transaction with given transaction isolation level.
|
||||
// Any error encountered during this operation is logged to runtime logger.
|
||||
func (r *Runtime) StartTx(i sql.IsolationLevel) (tx *sqlx.Tx, ok bool) {
|
||||
tx, err := r.Db.BeginTxx(context.Background(), &sql.TxOptions{Isolation: i})
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue