Hello, On 5/26/21 15:24, Phil Stracchino wrote: > On 5/26/21 3:22 AM, Eric Bollengier via Bacula-devel wrote: >> Hello, >> >> On 5/25/21 18:14, Phil Stracchino wrote: >>> Well, true, yes. VARCHAR(80) doesn't actually save anything over >>> VARCHAR(96) unless there are values over 80 characters. Good point. I >>> suppose for prudence' sake 96 or even 128 would be safer. >> >> I would recommend to not change this parameter, the LStat field size can vary >> from one platform to an other (on windows or FreeBSD, it is longer than on >> Linux). >> We may need to encode any kind of data into the field to get it back at the >> restore time and during the file selection. > > > How MUCH longer? TEXT fields are really a bad idea. Is there no safe > "never exceed" number that we can decide on?
If tomorrow we want to use LStat to store something important, we will appreciate to not have to run hours of procedure to update the database field. It is probably not the most efficient storage, but we are also looking for usability. Limits are always very painful to manage. > As a database architect my > instinct is to keep fields as short as possible, but the incremental > cost of increasing the maximum size of a VARCHAR or VARBINARY field is > very small. We're really using far too many TEXT and BLOB columns, and > most of them are in places where they're not necessary or even > appropriate. (A BLOB for an md5sum?) MD5 is small, SHA512 is much bigger, the next algorithm might be even longer. BLOB is not great, but a varchar(255) is too small. Maybe MySQL has some new feature that can avoid the BLOB storage. All these options were decided probably 15 to 20 years ago, maybe we can adapt things, but we need facts and figures (and a procedure to test). You can try to adapt the schema and report the difference in term of size, speed of the SELECT requests (we usually don't query on MD5 or LSstat), the speed of insertion. If we reach something interesting (5 to 10% minimum), then it worth to change. If we are bellow 5% of storage saved for example, then we can document these change for example in the contrib directory and keep the idea for later. Thanks for your help, Best Regards, Eric _______________________________________________ Bacula-devel mailing list Bacula-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bacula-devel