Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

Re: Re: Handling huge BLOB fields with DBI and MySQL

by Rhose (Priest)
on Mar 08, 2002 at 15:26 UTC ( #150343=note: print w/ replies, xml ) Need Help??


in reply to Re: Handling huge BLOB fields with DBI and MySQL
in thread Handling huge BLOB fields with DBI and MySQL

While this is not a perl question, how does storing these files in blobs impact your database recovery procedures?

From what I understand, MySQL does have a (slightly crude) recovery method -- the database keeps an update log of all activity. You can then replay the update log which stores the changes since your last database backup to bring the system "up to date". (Although I have not played with this, I also assume you could edit the update log to simulate a point in time recovery.)

It would seem that storing just the file names (assuming you do not have version control in place for the documents) means that you would have a very difficult time recovering from certain failures. However, (as I mentioned earlier, I have not played with the MySQL update logs) it would also seem that storing the changes to multi-meg or multi-gig fields would cause the update log to exceed the OS file size limitations.

How have these concerns impacted your implementations?


Comment on Re: Re: Handling huge BLOB fields with DBI and MySQL
OT - database recovery - Re: Handling huge BLOBs
by gmax (Abbot) on Mar 08, 2002 at 15:56 UTC

    Recovery of a database could be as easy as running your latest backup and restart business, if you are well organized.

    If you are using binary logs, the system can recover fairly easily. BLOBs are not a problem here, they are just more data in your database.

    About organizing yourself, you might have noticed that I added a timestamp field to my table. This way, I can have a progressive backup of the fields that were modified in a given timeframe, to integrate with a full weekly backup.
    The subject deservers more space than we can dedicate here. The matter is explained much better than this in Paul Dubois' book, MySQL.

    Personally, I would say that storing blobs in sparse files makes your task more difficult, but TMTOWTDI, after all, and I might be wrong. Let's say that I am just more confortable with my current architecture.

     _  _ _  _  
    (_|| | |(_|><
     _|   
    

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://150343]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others having an uproarious good time at the Monastery: (16)
As of 2014-12-18 16:01 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (58 votes), past polls