Skip to content

Parse.com vs Parse Server - Slower Queries #1564

Closed
@jobacao

Description

@jobacao

For implementation related questions or technical support, please refer to the Stack Overflow and Server Fault communities.

Make sure these boxes are checked before submitting your issue -- thanks for reporting issues back to Parse Server!

Environment Setup

Environments

  1. parse.com with mlab mongo
  2. parse server 2.2.7 with mlab mongo

Steps to reproduce

Query 1) and 2) with a where, limit and order clause. Example:

/classes/albums
{"where":{"artists":"Band"},"limit":100,"order":"-releaseDateValue"}
  1. parse.com generates a query that takes 524 ms
  2. parse server generates a more complicated / nested query that takes 1134 ms

Logs/Trace

  1. parse.com query
{ $query: { artists: "Band", _rperm: { $in: [ null, "*" ] } }, $orderby: { releaseDateValue: -1 }, $maxScan: 500000, $maxTimeMS: 29000, $comment: "queryhash:89c4fc26d1926094198e827388a261e8" } planSummary: COLLSCAN, COLLSCAN ntoreturn:100 ntoskip:0 nscanned:0 nscannedObjects:128120 scanAndOrder:1 keyUpdates:0 writeConflicts:0 numYields:1001 nreturned:51 reslen:992098 locks:{ Global: { acquireCount: { r: 2004 } }, MMAPV1Journal: { acquireCount: { r: 1002 } }, Database: { acquireCount: { r: 1002 } }, Collection: { acquireCount: { R: 1002 } } } 524ms
  1. parse server 2.2.7
{ $query: { $and: [ { artists: { $all: [ "Band" ] } }, { $or: [ { _rperm: { $exists: false } }, { _rperm: { $in: [ "*" ] } } ] } ] } } planSummary: COLLSCAN, COLLSCAN ntoreturn:100 ntoskip:0 nscanned:0 nscannedObjects:128120 scanAndOrder:1 keyUpdates:0 writeConflicts:0 numYields:1001 nreturned:51 reslen:992098 locks:{ Global: { acquireCount: { r: 2004 } }, MMAPV1Journal: { acquireCount: { r: 1002 } }, Database: { acquireCount: { r: 1002 } }, Collection: { acquireCount: { R: 1002 } } } 1134ms

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions