mystik has asked for the wisdom of the Perl Monks concerning the following question:
I'm considering a project where I would store large binary files (1-15meg) in a database. (MySQL) There will be many inserts (not usually concurently), few select's and rarely deletes.
My question is this: Can this be done efficently(read: conserving memory) in perl? (Under mod_perl & DBI?) The only solution that comes readily to mind is to slurp the file into one honkin' scalar, and use binding values to stuff it into the database. This poetentially has some nasty memory usage problems.
I'd like to use the database to store files because it allows me to keep all data related to the application in one place. However, If this approach has more drabacks than benefits, I'll just revert to using a sql table to manage on-disk files. Thanks in advance for any ideas or suggestions.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Storing files in a database
by TomDLux (Vicar) on Aug 11, 2003 at 01:06 UTC | |
|
Re: Storing files in a database
by blue_cowdawg (Monsignor) on Aug 11, 2003 at 01:39 UTC | |
|
Re: Storing files in a database
by gmax (Abbot) on Aug 11, 2003 at 09:34 UTC | |
|
Re: Storing files in a database
by mystik (Sexton) on Aug 11, 2003 at 03:32 UTC | |
by waswas-fng (Curate) on Aug 11, 2003 at 03:57 UTC |