DataNucleus JIRA is now in read-only mode. Raise any new issues in GitHub against the plugin that it applies to. DataNucleus JIRA will remain for the foreseeable future but will eventually be discontinued
Issue Details (XML | Word | Printable)

Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Minor Minor
Assignee: Unassigned
Reporter: Chris Rued
Votes: 0
Watchers: 0

If you were logged in you would be able to see more operations.
DataNucleus Store MongoDB

patch: map/reduce implementation of count() query slow

Created: 10/May/12 09:50 PM   Updated: 19/May/12 04:24 PM   Resolved: 11/May/12 08:11 AM
Component/s: Query
Affects Version/s: 3.1.0.m3
Fix Version/s: 3.1.0.m4

File Attachments: 1. Text File vcs-diff7142566692351798455.patch (4 kB)

 Description  « Hide
The current map/reduce implementation for a simple count query (introduced by NUCMONGODB-68) is unnecessarily slow. As it stands, only a simple count() over a collection with a simple filter and without GROUP BY is supported, so I propose to use the count() method available in the MongoDB Java driver.

Patch will follow shortly.

(NB: For count queries with GROUP BY clauses and other aggregates, map-reduce may still be required as suggested in NUCMONGODB-71)

Chris Rued made changes - 10/May/12 09:53 PM
Field Original Value New Value
Attachment vcs-diff7142566692351798455.patch [ 11651 ]
Chris Rued added a comment - 10/May/12 09:53 PM
Patch to use MongoDB driver's count() method for very simple count() queries

Andy Jefferson added a comment - 11/May/12 08:11 AM
Thx. Patch applied, plus changes to JDOQLQuery/JPQLQuery to call the new method.

Andy Jefferson made changes - 11/May/12 08:11 AM
Status Open [ 1 ] Resolved [ 5 ]
Fix Version/s 3.1.0.m4 [ 11564 ]
Resolution Fixed [ 1 ]
Andy Jefferson made changes - 19/May/12 04:24 PM
Status Resolved [ 5 ] Closed [ 6 ]