Skip to content

problem with batchsize #12

@raviraj555

Description

@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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions