Hi Andy.
First of all, thank you for your answers. I'm new about Jena, so I' ll try
to be as much accurate as possible.
What kind of dataset are you using? Some don't copy at this point, some
do.
I'm using a typical RDF dataset. I create it by
TDBFactory.createDataset(...). If I understood well, there are some kind of
dataset that don't copy data to memory when I do
dirstDataset.addNamedModel("second", secondModel). Is it correct? If so,
what are these kinds of dataset? Maybe I could try use them.
Thank you very much for your courtesy
Regards
Davide
2013/7/21 Andy Seaborne <[email protected]>
> On 21/07/13 14:04, Davide Rossi wrote:
>
>> Hi everybody,
>> I have two large datasets, each of which is about 2GB of memory. Now, I
>> have to query both datasets in one single query because the informations I
>> have to retrieve are divided in these datasets so I have to navigate their
>> union. The problem is that I have only 1GB of memory on my JVM so when I
>> try to do
>> firstDataset.addNamedModel("**second", secondModel)
>>
>
> What kind of dataset are you using? Some don't copy at this point, some
> do.
>
>
> or
>> firstModel.add(secondModel)
>> I have an OutOfMemoryError. So, I would like to know if is possible solve
>> this memory problem avoiding store all the informations in only one
>> dataset
>> (I must store the informations in two datasets).
>>
>> Thanks for your answers
>> regards
>> Davide
>>
>>
> Do you mean in two graphs rather than two datasets? An RDF dataset is
> itself a collection of graphs.
>
> If you are running out of memory, then you probably want to consider using
> a database to store the data.
>
> See TDB:
>
> http://jena.apache.org/**documentation/tdb/index.html<http://jena.apache.org/documentation/tdb/index.html>
>
> Andy
>