English 中文(简体)
哪些措施最有效地在省会增加每周总数?
原标题:What s the most efficient way of incrementing weekly totals in mongo?

在我拥有每周总点作为每个用户的一系列愤怒的情况下,我正在第7号图中读到“蒙巴非银行开发商的50条坡道和小trick”中,为了在蒙戈邦取得最佳业绩,我应先填满阵列。 因此,对每个用户来说,我应该说,在时间之前插入20周。 e.g.

Profile:{name:bob, totals:[{week:1,pts:0}, {week:2,pts:0}, {week:2,pts:0}, {week:2,pts:0}...etc..]}

如果情况如此,更新外地要点的最佳途径是什么? 如果该周的条目存在,我可以做一美元指挥,但我是否应该先增加ToSet指挥,以确保该周的进入存在,然后由美元指挥? 这似乎效率不高......美元指挥与某种ert升相结合?

该书的例子表明,我可以说,我不是将总数列入简介,而是为每个用户编制年度总文件,该文件中有一系列每周的点,有价值52周的预告。 然后,如果每个用户上周,我可以做批量的工作,为他们制定新的年度总文件。

难道最好把我的总数储存在适当的收集中,而不是放在我的使用案例的简介中?

问题回答

暂无回答




相关问题
Create an incrementing timer in seconds in 00:00 format?

I want to create an incrementing second timer like a stopwatch. So I want to be able to display the seconds and minutes incrementing in the format 00:01... Google only brings up 24 hour clock ...

Postgres serial value incrementing by 2

I have some tables in my postgres database, and a few of them inherit from each other. For example: CREATE TABLE parent_table(parent_table_id SERIAL PRIMARY KEY, my_col1 VARCHAR(16) NOT ...

How can I increment a char?

I m new to Python, coming from Java and C. How can I increment a char? In Java or C, chars and ints are practically interchangeable, and in certain loops, it s very useful to me to be able to do ...

Accessing loop iteration in a sub-function?

I m using the Google Maps API to plot several points on a map. However, in the click event function below, i is always set to 4, i.e. its value after iterating the loop: // note these are actual ...

Increment value of textinput with jquery like spinner

Trying to create a simple spinner effect with Jquery, i.e. two buttons (up & down) with a text field. The upbutton increases the value while the down button decreses the value. increment steps + ...

热门标签