Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / Databases / October 2005

Tip: Looking for answers? Try searching our database.

Can I insert large blocks of data without using tons of memory client side?

Thread view: 
chad - 14 Oct 2005 16:08 GMT
We have this database that where one of the feilds is going to be a
HUGE block of text, several megabytes. Right now we're saving that by
doing a simple

statement.execute(SQL) where SQL is a string that may be tens of
megabytes in length.   Not only do we need to load the SQL statement
into memory as a string, but somewhere along the line that string gets
copied, meaning we need to have twice as much memory as the data in the
file. (The database is on another machine)

I'm trying to shrink the memory requirements of our program, and this
is the major source of memory use.  Is there any way to publish data
into a table without loading the whole thing into memory, twice?

No, I did not design the database...
Robert Klemme - 14 Oct 2005 16:22 GMT
> We have this database that where one of the feilds is going to be a
> HUGE block of text, several megabytes. Right now we're saving that by
[quoted text clipped - 11 lines]
>
> No, I did not design the database...

http://java.sun.com/j2se/1.4.2/docs/api/java/sql/PreparedStatement.html#setChara
cterStream(int,%20java.io.Reader,%20int
)

Kind regards

   robert
chad - 14 Oct 2005 16:27 GMT


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.