mirror of
https://github.com/documize/community.git
synced 2025-07-19 21:29:42 +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
|
@ -13,9 +13,9 @@ All you need to provide is PostgreSQL, Microsoft SQL Server or any MySQL variant
|
||||||
|
|
||||||
## Latest Release
|
## Latest Release
|
||||||
|
|
||||||
[Community Edition: v3.2.0](https://github.com/documize/community/releases)
|
[Community Edition: v3.3.0](https://github.com/documize/community/releases)
|
||||||
|
|
||||||
[Enterprise Edition: v3.2.0](https://www.documize.com/downloads)
|
[Enterprise Edition: v3.3.0](https://www.documize.com/downloads)
|
||||||
|
|
||||||
> *We provide frequent product updates for both cloud and self-hosted customers.*
|
> *We provide frequent product updates for both cloud and self-hosted customers.*
|
||||||
>
|
>
|
||||||
|
|
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
|
Product domain.Product
|
||||||
}
|
}
|
||||||
|
|
||||||
// StartTx beings database transaction with application defined
|
// StartTx begins database transaction with given transaction isolation level.
|
||||||
// database transaction isolation level.
|
|
||||||
// Any error encountered during this operation is logged to runtime logger.
|
// Any error encountered during this operation is logged to runtime logger.
|
||||||
func (r *Runtime) StartTx(i sql.IsolationLevel) (tx *sqlx.Tx, ok bool) {
|
func (r *Runtime) StartTx(i sql.IsolationLevel) (tx *sqlx.Tx, ok bool) {
|
||||||
tx, err := r.Db.BeginTxx(context.Background(), &sql.TxOptions{Isolation: i})
|
tx, err := r.Db.BeginTxx(context.Background(), &sql.TxOptions{Isolation: i})
|
||||||
|
|
|
@ -42,7 +42,7 @@ func main() {
|
||||||
rt.Product.Major = "3"
|
rt.Product.Major = "3"
|
||||||
rt.Product.Minor = "3"
|
rt.Product.Minor = "3"
|
||||||
rt.Product.Patch = "0"
|
rt.Product.Patch = "0"
|
||||||
rt.Product.Revision = "190912103027"
|
rt.Product.Revision = "190912141927"
|
||||||
rt.Product.Version = fmt.Sprintf("%s.%s.%s", rt.Product.Major, rt.Product.Minor, rt.Product.Patch)
|
rt.Product.Version = fmt.Sprintf("%s.%s.%s", rt.Product.Major, rt.Product.Minor, rt.Product.Patch)
|
||||||
rt.Product.Edition = domain.CommunityEdition
|
rt.Product.Edition = domain.CommunityEdition
|
||||||
rt.Product.Title = fmt.Sprintf("%s Edition", rt.Product.Edition)
|
rt.Product.Title = fmt.Sprintf("%s Edition", rt.Product.Edition)
|
||||||
|
|
2156
embed/bindata.go
2156
embed/bindata.go
File diff suppressed because one or more lines are too long
Loading…
Add table
Add a link
Reference in a new issue