on 2017 Dec 29 1:08 PM
We currently have a replicating system. Some of the tables contain columns that store images,PDF's,email messages etc. Subsequently the databases, especially the consolidated DB have become very large (currently 250GB for the consolidated). We are looking at separating out all the BLOB fields into separate areas. This would make tasks such as backing up off-site easier to schedule.
Because we have a replicating system across the WAN storing them as file locations is not really an option - yes we could do this but administration could be a nightmare.
An option is to create a completely new database dedicated to storing the images - so the main DB would have a field 'ImageIndex', this would point to the relevant field in the new IMAGE database . This to would be a replicated DB. The only down side I can see here is that both DB's might not replicate back to their corresponding consolidated DB's at the same time and there could be a data sync issue.
Another option is to use DBSPACES on the current database. I'm not sure how I would do this on the current replicating DB. Would I have to unload the consolidated AND the remote DB's ?
I suppose I could also just create a new table in the current DB just for images - but it would mean the database remains the same size - quite large for backing up (especially to the off-site backup) .
Any suggestions/comments would be welcome.
Request clarification before answering.
I agree with the previous responses that a separate DBSapce to hold the BLOB data doesn't really help you, and neither does moving all the blobs into a separate table in the same database.
One possible solution would involve taking all of your BLOBs and putting them in a single table in a completely separate database. Your main database would then define a proxy table to the table in the blob database that holds all the BLOB data. As you point out, this does lead to the potential that your main database and the blob database could be out of synch. You'd need to add code to your application to handle this situation, particularly when the main DB is ahead of the blob DB. After breaking out the BLOBs to another database you then have two options :
1) Each remote location would now have two databases, that bother replicated separately.
2) Because your replication is over a WAN, you could consider having a single BLOB database running as a network server that all your remote sites have access to (still via a proxy table). Whether this is a viable option depends on how often you are accessing the blobs, the size of the blobs, and what the performance is like over the WAN.
How you would migrate to either of these environments from your current single database with as little disruption as possible is also an interesting project. I can give my thought on how that could be done if it's of interest.
Reg
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks Reg - This separate DB for the BLOB's could be the answer - I would also consider using the compressed option for the BLOB field as mentioned by Breck. I have lot's of different types of BLOB to store including images (JPEG), Email messages (.EML/.MSG) , Wordprocessing documents, and possibly some video (future development). Our WAN has quite good performance but I would need to do some tests on the single (non-replicated) DB option.
Yes, I think the migration might need some thought (I'd be interested to hear yours) - I would first just move everything to a new table in the current DB - when all this is working with our application then move the table into the new DB ? I could then remove all the 'old' BLOB fields and re-build the DB, this should shrink it down a bit.
How you do the migration depends on the answer to this question :
Can you pick a certain date and say the old system no longer works you have to do X to get things to work now? If the answer to that is yes, migration is easy. If the answer to that is no (it usually is), then there is more work involved, as we need to make sure that both the single-DB and multi-DB system will work at the same time.
Reg
In general, here's how I would do the migration to minimize the effect on existing users and allow you to have both the old and new schema active at the same time.
Reg
IMHO using dbspaces won't reduce backup time as the separate dbspaces must still be backed up with the main database. Unless there's some advantage because of location on different physical drives (rare nowadays in the times of SAN, RAIDs and VMs), I see more disadvantages than advantages. However, to do so, you would usually need to rebuild the cons, which should work fine with remotes as long as you care for the desired precautions like keeping log offsets accordingly... AFAIK there are some FAQs here dealing with adding and dropping dbspaces.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
76 | |
30 | |
8 | |
8 | |
7 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.