microsoft / microsoft/sql-server-samples
SQL SERVER 2019 calls to python take too long time, how to optimize
Nobody has claimed this yet.
- Dominant language
- PowerShell
- Stars
- 11.2k
- Forks
- 9.1k
- Avg merge
- 2d 7h
- Merged PRs (30d)
- 14
Description
Hello,
I want to use sp_execute_external_script to operate Python Statistical algorithm, but here’s the problem: there was a five-sec pause when transfer to pyhon code in store procedure,which leads to a bad response from our customers. I wrote external scripts enabled config_value=1 and run_value=1.
In addition, python code runs fast in single Python Executor, but slow in sqlserver store procedure, even the simplest summarize operation.
Thanks!
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
No files or tests are mentioned. Start by reproducing the simplest summarize operation through SQL Server's sp_execute_external_script and compare its timing with the standalone Python Executor. Done would require identifying the source of the five-second handoff and defining a validated optimization, but the issue provides no acceptance criteria.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python, sql
- Domain
- databases, performance
- Issue type
- Bug
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 20/100