Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

problem with batchsize #12

Open
raviraj555 opened this Issue · 0 comments

1 participant

@raviraj555

Hi TonyGen
in mongodb table I have 50k data
in this 50k I have 20k data with some username(ravi1)
Cur = mongo:find (emaillist, {'$query', {'userName', UserName}, '$orderby', {'userName',1}}, {},0, 5),

when I do such find query, here I get 5 records but it takes same time finding all 20k records
but if

Cur = mongo:find (emaillist, {'$query', {'userName', UserName}, '$orderby', {'userName',1}}, {},19,995, 5)

this also gives me 5 records but in no time

why first query takes more time to find 5 records
is there any other way so that I can get record faster in any case

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.