[CONJ-1146] Blob has inefficient memory handling Created: 2024-01-05 Updated: 2024-01-05 |
|
| Status: | Open |
| Project: | MariaDB Connector/J |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Task | Priority: | Major |
| Reporter: | Robin Rönnberg | Assignee: | Diego Dupin |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | None | ||
| Description |
|
When using hibernate with MariaDB Connector/J and retrieving a blob from the database, the entier blob is loaded into memory in MariaDbBlob.class, which is undesirable when streaming the blob to an OutputStream.
Inserting a large Blob into the database works good with streaming using hibernate session, without loading the entier file into memory:
PostgreSQL for example does not have this property and it is possible to retrieve a "blob-stream" without having to load the entier byte array into memory. I really like MariaDB and it would be great if it is possible to implement a driver that can deliver a more memory optimized handling of blobs when streaming data. Versions used: MariaDB 10.6 and MariaDB Connector/J 3.2 |