I have a class, RawData, with records containing a *name *field and a *data 
*field (each data field holds 50+ MB of text). I'm trying to produce a fast 
query to retrieve just the RIDs and *name* fields for all RawData records.  
(The goal is to give users a summary view of the names and RIDs so that 
they can retrieve raw data by RID). 

Unfortunately, the queries I've tried are running very slowly and seem to 
be including/processing the large *data *field.  Ideally, I'm looking for a 
fast Java API query that will return something along the lines of a 
JSONArray of the form:
[ {  "id": "#13:0", "name": "foo" }, { "id": "#13:1", "name": "bar" } ]
which I could then use directly as a JSONArray in Java.

In the console, these queries seem to produce what I'm looking for, but 
they're both too slow. With 16 records, the queries take about 25sec to run 
in the console on a development machine (the fetchplan doesn't seem to 
matter):
select set(@this.toJSON('id,name')) from ( select @rid as id, ifnull(name, 
"") as name from RawData )
select set(@this.toJSON('id,name')) from ( select @rid as id, ifnull(name, 
"") as name from RawData fetchPlan data:-2 )

I'm using version 1.7.9.

Is there a better/faster query for the results? Do I need to move the large 
data field into a separate, linked record?

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"OrientDB" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to