microsoft / microsoft/mssql-python

Optimization: Can we use chunking for String ( CHAR,VARCAR,NVARCHAR) data type to remove extra memory allocation

Aperta
#455 2 commenti 1 reazione 1 assegnatario Vedi su GitHub

@subrata-ms ci sta già lavorando.

Dal 26/2/2026.

area: performance enhancement triage done
Lingua principale
Python
Stelle
473
Fork
60
Merge medio
2g 11h
PR unite (30g)
36

Descrizione

Describe the bug

Currently we allocate fixed size memory ( coulumnsize+1) to handle string data type. This was causing problem for CP1252 character set. We have fix this issue under reported SQLAlchemy bug ( https://github.com/microsoft/mssql-python/issues/435?reload=1?reload=1 ).
However, we do see an opportunity improve the memory allocation for the string data type. One of the consideration/approach could be chunking.
This will help to reduce unnecessary memory allocation considerably during multithreaded execution and for large dataset.

Exception message:
Stack trace:
To reproduce

This is considered as code optimization. Below is the related bug -
https://github.com/microsoft/mssql-python/issues/435?reload=1?reload=1

Expected behavior

All string data type should handle CP1252 character set.

Guida per i contributori

Apri la guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.