summaryrefslogtreecommitdiff
path: root/internal/db/bundb/bundb.go
diff options
context:
space:
mode:
authorLibravatar tobi <31960611+tsmethurst@users.noreply.github.com>2022-03-07 11:33:18 +0100
committerLibravatar GitHub <noreply@github.com>2022-03-07 11:33:18 +0100
commit8de928b5e9441d3968e5f79860f4de08d52f24ed (patch)
treec5a4188e61294d59e73e0e3a1f0c684c7be112fd /internal/db/bundb/bundb.go
parent[feature] Clean up/uncache remote media (#407) (diff)
downloadgotosocial-8de928b5e9441d3968e5f79860f4de08d52f24ed.tar.xz
[performance] Database optimizations (#419)v0.2.1
* create first index on notifications * tidy up + add tests * log queries for trace, ops for debug * index commonly used fields * rearrange query * add a few more indexes * remove schema-breaking index (add this back in later) * re-add cleanup query index
Diffstat (limited to 'internal/db/bundb/bundb.go')
-rw-r--r--internal/db/bundb/bundb.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/internal/db/bundb/bundb.go b/internal/db/bundb/bundb.go
index ebdbc4ba2..5ccca0629 100644
--- a/internal/db/bundb/bundb.go
+++ b/internal/db/bundb/bundb.go
@@ -137,8 +137,8 @@ func NewBunDBService(ctx context.Context) (db.DB, error) {
}
// add a hook to just log queries and the time they take
- // only do this for trace logging where performance isn't 1st concern
- if logrus.GetLevel() >= logrus.TraceLevel {
+ // only do this for logging where performance isn't 1st concern
+ if logrus.GetLevel() >= logrus.DebugLevel {
conn.DB.AddQueryHook(newDebugQueryHook())
}