I am saving huge blob(500 MB) into oracle DB using JDBC. It takes a lot of time in insertion and later on retrieval.
Please suggest, if any of you have encountered this problem.
I am saving huge blob(500 MB) into oracle DB using JDBC. It takes a lot of time in insertion and later on retrieval.
Please suggest, if any of you have encountered this problem.
Lots of non-database people are really scared of sticking BLOBs and CLOBs in databases. They shouldn't be. Oracle manages them very well. Also bear in mind that Oracle also develops file systems (including BTRFS) so know about storing all kinds of data. Data in the database can be better protected against media or system failure, secured against unauthorised access and audited for improper use.
You should be using 11g and SecureFile LOBS. This document on SecureFile performance gives guidelines to achieving performance that is as good or better than regular filesystem storage.
Of course it is worth checking what the bottleneck is first. If it is the network between the app server and the DB server then no amount of database tuning will bypass the issue.
500 MB blob? Oh my God.
Look, seriously, the answer is "don't do that!" Relational databases aren't intended for that or optimized for it; the way the tables and filesystem have to be organized for indexing and searching aren't suited for that kind of big indigestable lump.
Consider, instead, creating a separate filesystem for this big lumps, and storing a pathname in the database.