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

FEAT: Optimize executemany() performance#138

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
gargsaumya merged 9 commits intomainfromsaumya/perf-improvement
Jul 17, 2025

Conversation

gargsaumya
Copy link
Contributor

@gargsaumyagargsaumya commentedJul 15, 2025
edited by azure-boardsbot
Loading

ADO Work Item Reference

AB#37935


Summary

This pull request introduces significant updates to theexecutemany method in themssql_python library to enable column-wise parameter binding for batched SQL execution. It also includes enhancements to the underlying C++ bindings to support this functionality. The most important changes involve implementing column-wise binding logic, adding helper functions for parameter buffer allocation, and exposing a newSQLExecuteMany method for executing batched statements.

Enhancements to Pythonexecutemany method:

  • mssql_python/cursor.py: Refactored theexecutemany method to use column-wise parameter binding for improved performance and scalability. Added_transpose_rowwise_to_columnwise helper function to convert row-wise parameters into column-wise format.

Updates to C++ bindings:

Helper functions for buffer allocation:

@CopilotCopilotAI review requested due to automatic review settingsJuly 15, 2025 08:50
@github-actionsgithub-actionsbot added the pr-size: mediumModerate update size labelJul 15, 2025
Copy link
Contributor

@CopilotCopilotAI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This pull request introduces column-wise parameter binding optimization for theexecutemany() method in the mssql_python library to improve performance for batched SQL execution. The changes enable binding multiple parameter sets at once rather than executing each parameter set individually.

  • Refactored Pythonexecutemany() method to use column-wise parameter binding instead of iterative execution
  • Added C++ binding functions to support array parameter binding for various SQL data types
  • Introduced helper functions for efficient parameter buffer allocation and memory management

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 7 comments.

FileDescription
mssql_python/cursor.pyCompletely rewroteexecutemany() to transpose row-wise parameters to column-wise format and use new batched execution method
mssql_python/pybind/ddbc_bindings.cppAddedBindParameterArray(),SQLExecuteMany_wrap(), andAllocateParamBufferArray() functions to support column-wise parameter binding

@github-actionsgithub-actionsbot added pr-size: mediumModerate update size and removed pr-size: mediumModerate update size labelsJul 15, 2025
@gargsaumyagargsaumyaforce-pushed thesaumya/perf-improvement branch froma0aadfc to16a2e58CompareJuly 15, 2025 08:57
@github-actionsgithub-actionsbot added pr-size: mediumModerate update size and removed pr-size: mediumModerate update size labelsJul 15, 2025
@gargsaumyagargsaumyaforce-pushed thesaumya/perf-improvement branch from16a2e58 to4ea32c7CompareJuly 15, 2025 09:05
@github-actionsgithub-actionsbot added pr-size: mediumModerate update size and removed pr-size: mediumModerate update size labelsJul 15, 2025
@github-actionsgithub-actionsbot added pr-size: mediumModerate update size and removed pr-size: mediumModerate update size labelsJul 15, 2025
@microsoftmicrosoft deleted a comment fromCopilotAIJul 15, 2025
@microsoftmicrosoft deleted a comment fromCopilotAIJul 15, 2025
@microsoftmicrosoft deleted a comment fromCopilotAIJul 15, 2025
@gargsaumyagargsaumyaforce-pushed thesaumya/perf-improvement branch frombf67d3a to42824f1CompareJuly 15, 2025 17:27
@github-actionsgithub-actionsbot added pr-size: mediumModerate update size and removed pr-size: mediumModerate update size labelsJul 15, 2025
jahnvi480
jahnvi480 previously approved these changesJul 16, 2025
bewithgaurav
bewithgaurav previously approved these changesJul 16, 2025
@github-actionsgithub-actionsbot added the pr-size: mediumModerate update size labelJul 16, 2025
bewithgaurav
bewithgaurav previously approved these changesJul 16, 2025
jahnvi480
jahnvi480 previously approved these changesJul 16, 2025
@github-actionsgithub-actionsbot added pr-size: mediumModerate update size and removed pr-size: mediumModerate update size labelsJul 17, 2025
@microsoftmicrosoft deleted a comment fromCopilotAIJul 17, 2025
@microsoftmicrosoft deleted a comment fromCopilotAIJul 17, 2025
@microsoftmicrosoft deleted a comment fromCopilotAIJul 17, 2025
@microsoftmicrosoft deleted a comment fromCopilotAIJul 17, 2025
@github-actionsgithub-actionsbot added pr-size: mediumModerate update size and removed pr-size: mediumModerate update size labelsJul 17, 2025
@gargsaumyagargsaumya merged commit03f8ee9 intomainJul 17, 2025
16 checks passed
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

Copilot code reviewCopilotCopilot left review comments

@sumitmsftsumitmsftsumitmsft left review comments

@bewithgauravbewithgauravbewithgaurav approved these changes

@jahnvi480jahnvi480jahnvi480 approved these changes

Assignees
No one assigned
Labels
pr-size: mediumModerate update size
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

4 participants
@gargsaumya@bewithgaurav@jahnvi480@sumitmsft

[8]ページ先頭

©2009-2025 Movatter.jp