guydoms wrote:the problem is that the blob size on SERVOY is much bigger than the original pdf (2mb vs 600kb or so, depending what's in the pdf)...
This reminded me of a solution which we built for a customer which already does store files as blobs. The solution is supposed to store word files exclusively, but during building it, I was sticking any old file in there as a test. I have just had a look at it and retrieved the 3 attached files that are currently in it. They are 2 jpegs and 1 tiff totalling 6MB.
The sybase .db file for that solution is 45.9MB!!! For reference point, I have 10 x .db files in the Servoy database folder and the next biggest one - the servoy repository - is only 7.8MB, out of the other .db files that I have built, the biggest (a much more extensive solution than the 45MB solution) is 3.8MB and they from there go down to about 1.5MB.
It seems that Servoy does swell far beyond what the files being put in are (I could have done this more scientifically by exporting the solution and importing as fresh empty version and starting from scratch adding files) it does seem however that there is some kind of vacuum in Servoy which adds stuff over and above the blobs that should actually be in there, or that they are not being removed by deleting records. As another test, I deleted the record that contained the biggest file (the 5.7MB .tiff)
This had 2 very surprising effects. Firstly, it took about 7 seconds to delete the record on my dual 2.0Ghz G5, and second - and most worrying, it increased the .db file to 89.3MB. I opened and closed Servoy a couple of times, same thing. I then shut down dbsrv9 as well and restarted servoy, this brought the size of .db back to 45M.9MB (did not reduce by the size of the file being removed either). Deleting one record containing one blob of 5.7MB doubled the size of the Sybase .db file until dbsrv9 was quit and restarted...
I remain entirely unconvinced. I think Andrea said it best, a filesystem is for files - especially when I don't understand what Servoy (or in fact Sybase) is actually doing with these blobs....