microsoft / microsoft/sql-server-samples

SQL SERVER 2019 calls to python take too long time, how to optimize

Open
#846 0 comments 0 reactions 0 assignees View on GitHub

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

  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.

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.