Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SQL server browser/connections API optimisations #60680

Merged
merged 4 commits into from
Feb 24, 2025

Conversation

nyalldawson
Copy link
Collaborator

@nyalldawson nyalldawson commented Feb 20, 2025

Considerably lightens the load when browsing SQL Server connections via browser by avoiding excessive database queries

Fixes #31101

@nyalldawson nyalldawson added the Optimization I feel the need... the need for speed! label Feb 20, 2025
@github-actions github-actions bot added this to the 3.42.0 milestone Feb 20, 2025
@nyalldawson nyalldawson added Frozen Feature freeze - Do not merge! MS SQL data provider labels Feb 20, 2025
Copy link

github-actions bot commented Feb 20, 2025

🪟 Windows builds

Download Windows builds of this PR for testing.
Debug symbols for this build are available here.
(Built from commit e58ea42)

🪟 Windows Qt6 builds

Download Windows Qt6 builds of this PR for testing.
(Built from commit e58ea42)

@nyalldawson nyalldawson removed the Frozen Feature freeze - Do not merge! label Feb 21, 2025
@nyalldawson nyalldawson reopened this Feb 22, 2025
@nyalldawson
Copy link
Collaborator Author

I think this should be backported, given that it fixes #31101

@nyalldawson
Copy link
Collaborator Author

Approval in #60728

@nyalldawson nyalldawson merged commit 3f3fde3 into qgis:master Feb 24, 2025
32 checks passed
@nyalldawson nyalldawson deleted the sql_server_browser_opt branch February 24, 2025 22:11
@qgis-bot
Copy link
Collaborator

The backport to queued_ltr_backports failed:

The process '/usr/bin/git' failed with exit code 1
stderr
error: could not apply 19df56c51a1... [mssql] Don't query ALL tables to retrieve single table details
hint: After resolving the conflicts, mark them with
hint: "git add/rm <pathspec>", then run
hint: "git cherry-pick --continue".
hint: You can instead skip this commit with "git cherry-pick --skip".
hint: To abort and get back to the state before "git cherry-pick",
hint: run "git cherry-pick --abort".
hint: Disable this message with "git config set advice.mergeConflict false"

stdout
Auto-merging src/providers/mssql/qgsmssqlproviderconnection.cpp
CONFLICT (content): Merge conflict in src/providers/mssql/qgsmssqlproviderconnection.cpp

To backport manually, run these commands in your terminal:

# Fetch latest updates from GitHub
git fetch
# Create a new working tree
git worktree add .worktrees/backport-queued_ltr_backports queued_ltr_backports
# Navigate to the new working tree
cd .worktrees/backport-queued_ltr_backports
# Create a new branch
git switch --create backport-60680-to-queued_ltr_backports
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick 19df56c51a16dbb7791e069ea2b31ae9376015d8,f3c37f557fde81e009a24a8d5bacbcd2d6ea3096,555bbe3c44da8b63544ea5d01c802c109fe50a67,e58ea426666e874d31119cf603c9a58a8bff7bfc
# Push it to GitHub
git push --set-upstream origin backport-60680-to-queued_ltr_backports
# Go back to the original working tree
cd ../..
# Delete the working tree
git worktree remove .worktrees/backport-queued_ltr_backports

Then, create a pull request where the base branch is queued_ltr_backports and the compare/head branch is backport-60680-to-queued_ltr_backports.

@qgis-bot qgis-bot added the failed backport The automated backport attempt failed, needs a manual backport label Feb 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport queued_ltr_backports Queued Backports backport release-3_42 failed backport The automated backport attempt failed, needs a manual backport MS SQL data provider Optimization I feel the need... the need for speed!
Projects
None yet
Development

Successfully merging this pull request may close these issues.

QGIS browser connections to MSSQL generate multiple (000s) processes on database server
2 participants