Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Audit log slows to a crawl when nearing 1 million entries #17689

Open
Assignees
kacpersaw
@mafredri

Description

@mafredri

Problem: Today, rendering the audit log on dev.coder.com takes over 1 minute for the first page.

When the audit log grows to a significant number of rows (currently970714 entries at the time of writing for dev.coder.com), the pagination causes it to become slow.

The main culprit is the "total" count (COUNT(audit_logs.*) OVER () AS count) which converts the query from rendering N first results to reading the entire table as the count is based on applied filters.

Simply changing this out for(SELECT COUNT(*) FROM audit_logs) AS count makes the query instant, but of course, incorrect.

Solution: We must figure out a way to optimize theGetAuditLogsOffset query to show results faster.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions


    [8]ページ先頭

    ©2009-2025 Movatter.jp