Skip to content

database: Add index on jobmedia mediaid,jobid#958

Merged
sduehr merged 5 commits intobareos:masterfrom
bruno-at-bareos:dev/bruno/4908-index_mediaid-jobid
Nov 3, 2021
Merged

database: Add index on jobmedia mediaid,jobid#958
sduehr merged 5 commits intobareos:masterfrom
bruno-at-bareos:dev/bruno/4908-index_mediaid-jobid

Conversation

@bruno-at-bareos
Copy link
Contributor

@bruno-at-bareos bruno-at-bareos commented Oct 14, 2021

This extra index boost performance on large table (400x)
Close CR#4908, Fix TT4200733

  • Catalog version is now 2210

Signed-off-by: Bruno Friedmann bruno.friedmann@bareos.com

Thank you for contributing to the Bareos Project!

Please check

  • Short description and the purpose of this PR is present above this paragraph
  • Your name is present in the AUTHORS file (optional)

If you have any questions or problems, please give a comment in the PR.

Helpful documentation and best practices

Checklist for the reviewer of the PR (will be processed by the Bareos team)

General
  • PR name is meaningful
  • Purpose of the PR is understood
  • Separate commit for this PR in the CHANGELOG.md, PR number referenced is same
  • Commit descriptions are understandable and well formatted
Source code quality
  • Source code changes are understandable
  • Variable and function names are meaningful
  • Code comments are correct (logically and spelling)
  • Required documentation changes are present and part of the PR
  • bareos-check-sources --since-merge does not report any problems
  • git status should not report modifications in the source tree after building and testing

@sduehr sduehr self-requested a review October 18, 2021 19:09
Copy link
Member

@sduehr sduehr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, some changes are necessary.

@sduehr sduehr self-assigned this Oct 18, 2021
Copy link
Member

@sduehr sduehr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like only a "," is missing, everything else looks good.

Copy link
Member

@sduehr sduehr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I fear we have to remove the IF NOT EXISTS with CREATE INDEX that I've proposed earlier, I forgot the we have to support RHEL/CentOS 7 which comes with PostgreSQL 9.2 by default, but this only work with PostgreSQL since 9.5.

bruno-at-bareos and others added 5 commits November 3, 2021 16:05
This extra index boost performance on large table (400x)
Close CR#4908, Fix TT4200733

- Catalog version is now 2210

Signed-off-by: Bruno Friedmann <bruno.friedmann@bareos.com>
Signed-off-by: Bruno Friedmann <bruno.friedmann@bareos.com>
- Create index MediaId,JobId also for mysql,sqlite3
- update cats.h with new version

Signed-off-by: Bruno Friedmann <bruno.friedmann@bareos.com>
Co-authored-by: sduehr <stephan.duehr@bareos.com>
Obsoleted PG 9.2 still present in Centos 7

Co-authored-by: sduehr <stephan.duehr@bareos.com>
Copy link
Member

@sduehr sduehr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, looks good now.

@sduehr sduehr merged commit d1e6689 into bareos:master Nov 3, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants