True async query execution
Maintainer antworten meist innerhalb von 2 Tagen
@sumitmsft arbeitet bereits daran.
Seit 03.3.2025.
Bewertung
Dieses Issue wurde noch nicht bewertet.
Beschreibung
Is your feature request related to a problem? Please describe.
Currently, mssql-python does not support true async execution, forcing developers to use thread-based workarounds (asyncio.to_thread() or aioodbc). This leads to performance limitations, increased memory usage, and suboptimal scalability in high-throughput applications, such as web servers and data processing pipelines.
For applications using FastAPI, Django Async, or AI/ML workloads, true async support is critical for handling multiple concurrent database operations efficiently. Without it, developers face blocking I/O that slows down event-driven applications.
Describe the solution you'd like
- Truly non-blocking I/O using
asyncio(asyncio.StreamReader/asyncio.StreamWriter). - Async query execution with
await conn.execute("SELECT ..."). - Streaming large result sets asynchronously using
async for row in cursor. - Better scalability for FastAPI, Django Async, and other async frameworks.
Example API:
async def stream_users():
conn = await asyncpg.connect(...)
async with conn.transaction(): # Ensures rollback on failure
async for row in conn.cursor("SELECT * FROM users"):
print(row) # Process each row asynchronously
await conn.close()
asyncio.run(stream_users())
### Describe alternatives you've considered
- asyncio.to_thread() → Still uses blocking I/O and threads, increasing overhead.
- aioodbc → Uses a thread pool, not true async, leading to performance bottlenecks.
- Custom Thread Management → Adds complexity and does not scale well under high concurrency.
### Additional context
- Vorherrschende Sprache
- Python
- Sterne
- 478
- Forks
- 62
- Ø Merge
- 3 T. 1 Std.
- Gemergte PRs (30 T.)
- 26
Entwicklungsumgebung
Startet den Dev-Container des Projekts im Browser, mit Ihrem eigenen GitHub-Konto.
- Kein Dockerfile und keine Docker-Compose-Datei
- Hat eine Pull-Request-Vorlage
- Beitragsleitfaden lesen
Erste Schritte
- Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
- Forken Sie das Repository und arbeiten Sie in einem Branch.
- Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.
Mehr aus microsoft/mssql-python
-
area: bulk-copy triage needed
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 70/100
microsoft/mssql-python#843 · 1 Kommentar ·
Maintainer antworten meist innerhalb von 2 Tagen
-
triage needed
Schwierigkeit 4/5 3-5 Tage Anfängerfreundlichkeit 22/100
microsoft/mssql-python#849 · 1 Kommentar ·
Maintainer antworten meist innerhalb von 2 Tagen
-
triage needed
Schwierigkeit 4/5 3-5 Tage Anfängerfreundlichkeit 20/100
microsoft/mssql-python#848 · 1 Kommentar ·
Maintainer antworten meist innerhalb von 2 Tagen
-
triage needed
Schwierigkeit 4/5 3-5 Tage Anfängerfreundlichkeit 35/100
microsoft/mssql-python#846 · 1 Kommentar ·
Maintainer antworten meist innerhalb von 2 Tagen
-
macOS: encrypted connections fail after Homebrew moved the `openssl` alias to `openssl@4`Evtl. vergeben @bewithgaurav hat das vor 16 Tagen übernommen. Offenarea: packaging-platform bug triage needed
Schwierigkeit 4/5 3-5 Tage Anfängerfreundlichkeit 55/100
microsoft/mssql-python#826 · 2 Kommentare · 1 zugewiesene Person ·
Maintainer antworten meist innerhalb von 2 Tagen
Alle Issues in microsoft/mssql-python
Ähnliche Issues
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 74/100
cellrishi-code/claude-skills-atlas#165 ·
Maintainer antworten meist innerhalb von 1 Tag
-
bug confirmed issue
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 72/100
open-webui/open-webui#32635 · 1 Kommentar ·
Maintainer antworten meist innerhalb von 1 Tag
-
Filters: ?field:ne=null matches NULL rows instead of non-NULL onesEvtl. vergeben @rshdhere hat das heute übernommen. Offen
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 72/100
Netflix/metaflow-service#504 ·
-
needs-triage
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 84/100
gke-labs/kube-agents#3394 ·
Maintainer antworten meist innerhalb von 1 Tag
-
A2A audit timestamps end in +00:00Z (invalid ISO 8601)Evtl. vergeben @O1sumitkumar hat das heute übernommen. Offenbug good first issue help wanted python
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 78/100
Maintainer antworten meist innerhalb von 1 Tag