nextcloud / nextcloud/server

[Bug]: Obsolete index jobs.job_class_index

Open
#49,842 0 comments 0 reactions 1 assignee View on GitHub

@ChristophWurst is already working on this.

Since Apr 2, 2025.

3. to review 30-feedback bug performance 🚀
Dominant language
PHP
Stars
36.9k
Forks
5.2k
Avg merge
2d 3h
Merged PRs (30d)
713

Description

⚠️ This issue respects the following points: ⚠️
Bug description
  1. core/Migrations/Version13000Date20170718121200.php adds the oc_jobs table and an index on (class)
  2. core/Migrations/Version24000Date20211230140012.php adds the oc_jobs.argument_hash and an index on (class, argument_hash)
create index job_class_index
    on nextclouddev.oc_jobs (class);

create index job_argument_hash
    on nextclouddev.oc_jobs (class, argument_hash);

The second index can be used in queries that only filter for the class, making the older index obsolete. This leads to more index maintenance work of the database. The old index should be dropped.

Steps to reproduce
  1. Install Nextcloud
Expected behavior

Efficient use of database indexes.

Nextcloud Server version

30

Operating system

None

PHP engine version

None

Web server

None

Database engine version

None

Is this bug present after an update or on a fresh install?

None

Are you using the Nextcloud Server Encryption module?

None

What user-backends are you using?
  • Default user-backend (database)
  • LDAP/ Active Directory
  • SSO - SAML
  • Other
Configuration report

List of activated Apps

Nextcloud Signing status

Nextcloud Logs

Additional info

No response

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.