[Glass] Query results as Streams and indexes question

BrunoBB via Glass glass at lists.gemtalksystems.com
Thu Jan 5 05:38:15 PST 2017


Hi All,

For collection with indexes you can use a readStream for large query result
(page 104 gs prg manual).

If you try to send #readStream to a collection without an equality index
then: 
a GsMalformedQueryExpressionError occurred (error 2710),
reason:acceptPredicate:, Query may not be streamed. 

So in the case an application need aStream on a GsQuery --> you have to pay
NO attention to "the rule of thumb" that only a collection with more that
2000 objects should have indexes (page 95 gs prg manual).

Is correct to say when a readStream is needed then you have to create the
index after the first element is added ?

Or my application code should be smart enough to use a readStream when there
is an index present and a simple GsQuery without readStream when there is no
index ?

How do you handle these cases ?

regards
bruno



--
View this message in context: http://forum.world.st/Query-results-as-Streams-and-indexes-question-tp4928858.html
Sent from the GLASS mailing list archive at Nabble.com.


More information about the Glass mailing list