Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

problem with batchsize #12

Open
raviraj555 opened this issue Jan 6, 2012 · 0 comments
Open

problem with batchsize #12

raviraj555 opened this issue Jan 6, 2012 · 0 comments

Comments

@raviraj555
Copy link

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
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant