You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
You can limit the number of results with `setLimit`. By default, results are limited to 100, but anything from 1 to 1000 is a valid limit:
42
+
You can limit the number of results with `setLimit`. By default, results are limited to 100. In the old Parse hosted backend, the maximum limit was 1,000, but Parse Server removed that constraint:
43
43
44
44
```java
45
45
query.setLimit(10); // limit to at most 10 results
You can skip the first results with `setSkip`. This can be useful for pagination:
64
+
You can skip the first results with `setSkip`. In the old Parse hosted backend, the maximum skip value was 10,000, but Parse Server removed that constraint. This can be useful for pagination:
If you want to retrieve objects where a field contains a `ParseObject` that matches a different query, you can use `whereMatchesQuery`. Note that the default limit of 100 and maximum limit of 1000 apply to the inner query as well, so with large data sets you may need to construct queries carefully to get the desired behavior. In order to find comments for posts containing images, you can do:
230
+
If you want to retrieve objects where a field contains a `ParseObject` that matches a different query, you can use `whereMatchesQuery`. In order to find comments for posts containing images, you can do:
@@ -387,7 +387,7 @@ Query caching also works with ParseQuery helpers including `getFirst()` and `get
387
387
388
388
## Counting Objects
389
389
390
-
Caveat: Count queries are rate limited to a maximum of 160 requests per minute. They can also return inaccurate results for classes with more than 1,000 objects. Thus, it is preferable to architect your application to avoid this sort of count operation (by using counters, for example.)
390
+
Note: In the old Parse hosted backend, count queries were rate limited to a maximum of 160 requests per minute. They also returned inaccurate results for classes with more than 1,000 objects. But, Parse Server has removed both constraints and can count objects well above 1,000.
391
391
392
392
If you just need to count how many objects match a query, but you do not need to retrieve all the objects that match, you can use `count` instead of `find`. For example, to count how many games have been played by a particular player:
You can limit the number of results by setting a limit. By default, results are limited to 100, but anything from 1 to 1000 is a valid limit:
39
+
You can limit the number of results by setting a limit. By default, results are limited to 100. In the old Parse hosted backend, the maximum limit was 1,000, but Parse Server removed that constraint:
40
40
41
41
```cpp
42
42
query.setLimit(10);
43
43
```
44
44
45
-
You can skip the first results by setting `skip`. This can be useful for pagination:
45
+
You can skip the first results by setting `skip`. In the old Parse hosted backend, the maximum skip value was 10,000, but Parse Server removed that constraint. This can be useful for pagination:
Copy file name to clipboardExpand all lines: _includes/common/performance.md
+3-8
Original file line number
Diff line number
Diff line change
@@ -694,7 +694,7 @@ Most of the use cases around using regular expressions involve implementing sear
694
694
695
695
Writing restrictive queries allows you to return only the data that the client needs. This is critical in a mobile environment were data usage can be limited and network connectivity unreliable. You also want your mobile app to appear responsive and this is directly affected by the objects you send back to the client. The [Querying section](#queries) shows the types of constraints you can add to your existing queries to limit the data returned. When adding constraints, you want to pay attention and design efficient queries.
696
696
697
-
You can limit the number of query results returned. The limit is 100 by default but anything from 1 to 1000 is a valid limit:
697
+
You can use skip and limit to page through results and load the data as is needed. The query limit is 100 by default:
698
698
699
699
```javascript
700
700
query.limit(10); // limit to at most 10 results
@@ -996,7 +996,7 @@ If later on, you need to modify the underlying data model, your client call can
996
996
997
997
## Avoid Count Operations
998
998
999
-
For classes with over 1,000 objects, count operations are limited by timeouts. Thus, it is preferable to architect your application to avoid this count operation.
999
+
When counting objects frequently, instead consider storing a count variable in the database that is incremented each time an object is added. Then, the count can quickly be retrieved by simply retrieving the variable stored.
1000
1000
1001
1001
Suppose you are displaying movie information in your app and your data model consists of a Movie class and a Review class that contains a pointer to the corresponding movie. You might want to display the review count for each movie on the top-level navigation screen using a query like this:
1002
1002
@@ -1288,17 +1288,12 @@ There are some limits in place to ensure the API can provide the data you need i
1288
1288
1289
1289
**Queries**
1290
1290
1291
-
* Queries return 100 objects by default. Use the `limit` parameter to change this, up to a value of 1,000.
1292
-
* Queries can only return up to 1,000 objects in a single result set. This includes any resolved pointers. You can use `skip` and `limit` to page through results.
1293
-
* The maximum value accepted by `skip` is 10,000. If you need to get more objects, we recommend sorting the results and then using a constraint on the sort column to filter out the first 10,000 results. You will then be able to continue paging through results starting from a `skip` value of 0. For example, you can sort your results by `createdAt ASC` and then filter out any objects older than the `createdAt` value of the 10,000th object when starting again from 0.
1294
-
* Alternatively, you may use the `each()` method in the JavaScript SDK to page through all objects that match the query.
1291
+
* Queries return 100 objects by default. Use the `limit` parameter to change this.
1295
1292
* Skips and limits can only be used on the outer query.
1296
-
* You may increase the limit of a inner query to 1,000, but skip cannot be used to get more results past the first 1,000.
1297
1293
* Constraints that collide with each other will result in only one of the constraint being applied. An example of this would be two `equalTo` constraints over the same key with two different values, which contradicts itself (perhaps you're looking for 'contains').
1298
1294
* No geo-queries inside compound OR queries.
1299
1295
* Using `$exists: false` is not advised.
1300
1296
* The `each` query method in the JavaScript SDK cannot be used in conjunction with queries using geo-point constraints.
1301
-
* A maximum of 500,000 objects will be scanned per query. If your constraints do not successfully limit the scope of the search, this can result in queries with incomplete results.
1302
1297
* A `containsAll` query constraint can only take up to 9 items in the comparison array.
Copy file name to clipboardExpand all lines: _includes/dotnet/queries.md
+4-4
Original file line number
Diff line number
Diff line change
@@ -56,7 +56,7 @@ var query = ParseObject.GetQuery("GameScore")
56
56
.WhereGreaterThan("playerAge", 18);
57
57
```
58
58
59
-
You can limit the number of results by calling `Limit`. By default, results are limited to 100, but anything from 1 to 1000 is a valid limit:
59
+
You can limit the number of results by calling `Limit`. By default, results are limited to 100. In the old Parse hosted backend, the maximum limit was 1,000, but Parse Server removed that constraint:
60
60
61
61
```cs
62
62
query=query.Limit(10); // limit to at most 10 results
@@ -76,7 +76,7 @@ var query = ParseObject.GetQuery("GameScore")
76
76
ParseObjectobj=awaitquery.FirstAsync();
77
77
```
78
78
79
-
You can skip the first results by calling `Skip`. This can be useful for pagination:
79
+
You can skip the first results by calling `Skip`. In the old Parse hosted backend, the maximum skip value was 10,000, but Parse Server removed that constraint. This can be useful for pagination:
80
80
81
81
```cs
82
82
query=query.Skip(10); // skip the first 10 results
@@ -285,7 +285,7 @@ var query = ParseObject.GetQuery("Comment")
Copy file name to clipboardExpand all lines: _includes/ios/queries.md
+4-4
Original file line number
Diff line number
Diff line change
@@ -150,7 +150,7 @@ let predicate = NSPredicate(format:"playerName != 'Michael Yabuti' AND playerAge
150
150
let query = PFQuery(className: "GameScore", predicate: predicate)
151
151
</code></pre>
152
152
153
-
You can limit the number of results by setting `limit`. By default, results are limited to 100, but anything from 1 to 1000 is a valid limit:
153
+
You can limit the number of results by setting `limit`. By default, results are limited to 100. In the old Parse hosted backend, the maximum limit was 1,000, but Parse Server removed that constraint:
You can skip the first results by setting `skip`. This can be useful for pagination:
190
+
You can skip the first results by setting `skip`. In the old Parse hosted backend, the maximum skip value was 10,000, but Parse Server removed that constraint. This can be useful for pagination:
If you want to retrieve objects where a field contains a `PFObject` that match a different query, you can use `whereKey:matchesQuery`. Note that the default limit of 100 and maximum limit of 1000 apply to the inner query as well, so with large data sets you may need to construct queries carefully to get the desired behavior. In order to find comments for posts with images, you can do:
573
+
If you want to retrieve objects where a field contains a `PFObject` that match a different query, you can use `whereKey:matchesQuery`. In order to find comments for posts with images, you can do:
574
574
575
575
<pre><codeclass="objectivec">
576
576
// Using PFQuery
@@ -830,7 +830,7 @@ Query caching also works with PFQuery helpers including `getFirstObject` and `ge
830
830
831
831
## Counting Objects
832
832
833
-
Caveat: Count queries are rate limited to a maximum of 160 requests per minute. They can also return inaccurate results for classes with more than 1,000 objects. Thus, it is preferable to architect your application to avoid this sort of count operation (by using counters, for example.)
833
+
Note: In the old Parse hosted backend, count queries were rate limited to a maximum of 160 requests per minute. They also returned inaccurate results for classes with more than 1,000 objects. But, Parse Server has removed both constraints and can count objects well above 1,000.
834
834
835
835
If you just need to count how many objects match a query, but you do not need to retrieve the objects that match, you can use `countObjects` instead of `findObjects`. For example, to count how many games have been played by a particular player:
You can limit the number of results by setting `limit`. By default, results are limited to 100, but anything from 1 to 1000 is a valid limit:
45
+
You can limit the number of results by setting `limit`. By default, results are limited to 100. In the old Parse hosted backend, the maximum limit was 1,000, but Parse Server removed that constraint:
46
46
47
47
<pre><codeclass="javascript">
48
48
query.limit(10); // limit to at most 10 results
@@ -64,7 +64,7 @@ query.first({
64
64
});
65
65
</code></pre>
66
66
67
-
You can skip the first results by setting `skip`. This can be useful for pagination:
67
+
You can skip the first results by setting `skip`. In the old Parse hosted backend, the maximum skip value was 10,000, but Parse Server removed that constraint. This can be useful for pagination:
68
68
69
69
<pre><codeclass="javascript">
70
70
query.skip(10); // skip the first 10 results
@@ -221,7 +221,7 @@ query.find({
221
221
});
222
222
</code></pre>
223
223
224
-
If you want to retrieve objects where a field contains a `Parse.Object` that matches a different query, you can use `matchesQuery`. Note that the default limit of 100 and maximum limit of 1000 apply to the inner query as well, so with large data sets you may need to construct queries carefully to get the desired behavior. In order to find comments for posts containing images, you can do:
224
+
If you want to retrieve objects where a field contains a `Parse.Object` that matches a different query, you can use `matchesQuery`. In order to find comments for posts containing images, you can do:
225
225
226
226
<pre><codeclass="javascript">
227
227
var Post = Parse.Object.extend("Post");
@@ -297,7 +297,7 @@ You can issue a query with multiple fields included by calling `include` multipl
297
297
298
298
## Counting Objects
299
299
300
-
Caveat: Count queries are rate limited to a maximum of 160 requests per minute. They can also return inaccurate results for classes with more than 1,000 objects. Thus, it is preferable to architect your application to avoid this sort of count operation (by using counters, for example.)
300
+
Note: In the old Parse hosted backend, count queries were rate limited to a maximum of 160 requests per minute. They also returned inaccurate results for classes with more than 1,000 objects. But, Parse Server has removed both constraints and can count objects well above 1,000.
301
301
302
302
If you just need to count how many objects match a query, but you do not need to retrieve all the objects that match, you can use `count` instead of `find`. For example, to count how many games have been played by a particular player:
You can limit the number of results by setting `limit`. By default, results are limited to 100, but anything from 1 to 1000 is a valid limit:
38
+
You can limit the number of results by setting `limit`. By default, results are limited to 100. In the old Parse hosted backend, the maximum limit was 1,000, but Parse Server removed that constraint:
You can skip the first results by setting `skip`. This can be useful for pagination, though it is limited to a maximum of ten thousand:
52
+
You can skip the first results by setting `skip`. In the old Parse hosted backend, the maximum skip value was 10,000, but Parse Server removed that constraint. This can be useful for pagination:
53
53
54
54
<pre><codeclass="php">
55
55
$query->skip(10); // skip the first 10 results
@@ -214,7 +214,7 @@ $comments = $query->find();
214
214
// comments now contains the comments for myPost
215
215
</code></pre>
216
216
217
-
If you want to retrieve objects where a field contains a `ParseObject` that matches a different query, you can use `matchesQuery`. Note that the default limit of 100 and maximum limit of 1000 apply to the inner query as well, so with large data sets you may need to construct queries carefully to get the desired behavior. In order to find comments for posts containing images, you can do:
217
+
If you want to retrieve objects where a field contains a `ParseObject` that matches a different query, you can use `matchesQuery`. In order to find comments for posts containing images, you can do:
218
218
219
219
<pre><codeclass="php">
220
220
$innerQuery = new ParseQuery("Post");
@@ -276,7 +276,7 @@ You can issue a query with multiple fields included by calling `includeKey` mult
276
276
277
277
## Counting Objects
278
278
279
-
Caveat: Count queries are rate limited to a maximum of 160 requests per minute. They can also return inaccurate results for classes with more than 1,000 objects. Thus, it is preferable to architect your application to avoid this sort of count operation (by using counters, for example.)
279
+
Note: In the old Parse hosted backend, count queries were rate limited to a maximum of 160 requests per minute. They also returned inaccurate results for classes with more than 1,000 objects. But, Parse Server has removed both constraints and can count objects well above 1,000.
280
280
281
281
If you just need to count how many objects match a query, but you do not need to retrieve all the objects that match, you can use `count` instead of `find`. For example, to count how many games have been played by a particular player:
0 commit comments