I have large data on my app, but if I execute Collection.find().count() many times on google chrome console, the results are increasing until reached real total data, so how to count data faster as I execute ‘db.getCollection(‘books’).find().count()‘ on mongo console?
my script before: http://meteorpad.com/pad/rfoeDhdzepNubnnTe/Count%20Data1
Explanation: minimongo synchronizing the data from the server to the client, which takes the longer the more documents you have. The size of the documents also matters.
for example, I have a collection with a lot of large documents in it. When I want my client to have access to that collection, I only sync the title field. When the client needs access to the entire document, it will get published it in it’s entirety. In order to get the total number of books, you would need a method
1 2 3 4 5
then use reactive variable, for simple way you can add Meteor Reactive Methods
and add to the client d
1 2 3 4 5
Thanks to jamgold and Google Translate