Other DB bitmap data type

LucaMs

Expert
Licensed User
Longtime User
What is the "fastest data type" to save images in a DB?

Base64 strings or arrays of bytes (BLOB)?

[the real question should be which of them requires less memory. Well, I can do some tests, but if you are fast... :) thank you]


P.S.
I have to share this information between client and server.
I suppose that this is always a normal exchange of bytes and so this does not affect.


...
After few tests on little bitmaps, strings require about 30% more memory.
 
Last edited:

LucaMs

Expert
Licensed User
Longtime User
I need to exchange data between clients and a web server.

I should do as Erel suggested here:
The WebSocket client doesn't support binary transfers. If the file is small then you can encode it as base64 string. However for larger files it is recommended to use a standard http request. Otherwise you will block the single WebSocket connection.

I mean: "...use a standard http request".

My images will be small enough to be encoded, but they can be many (at least five for each web socket, one web socket for each client, hoping that clients will be thousands ;)).
 
Upvote 0
Top