From: Ed Yu on
Dan,

Looks like you already knew the answer... There are only the 2 ways you had described. I'm wondering though... 256M of RAM seems to be really small for computer these days. Could you get more RAM to allow a bigger heap. I'm using a laptop with 8G of RAM ;)

Good luck!
Ed.

"Dan Glaser" <dan.glaser(a)benchmarksolutions.com> wrote in message <hruv55$45b$1(a)fred.mathworks.com>...
> I'm wondering if there is any way to preallocate a dataset. From what I can see, this impossible.
>
> The problem I am trying to solve is getting a large amount of data from a sql query into Matlab. If I run the whole query, I get a java heap space error (even if I increase the heap space to the max 256M) If I break up the query, and repeatedly concatenate the newly queried dataset result to the original dataset, the repeated copying of all the data (as Matlab tries to find a big enough space for it) takes forever.
>
> Is there a way to solve this problem?
> Thanks