剛學(xué)mongo 不知道改怎么處理這個需求比較恰當(dāng):
每個用戶都有個前綴 來建立很多collection 名字類似于這樣: user1_abcd
有N個用戶 每個用戶也有N個collection
我想列出某個用戶所有的collection mongo并沒有單獨的一個接口能實現(xiàn) 而是用獲得所有collection然后遍歷來判斷 這樣我看來效率非常低
想請教高手看看有沒有更有效率的辦法?
學(xué)習(xí)是最好的投資!
What is the requirement to create multiple collections for each user?.?
Why can’t we change the unfortunate structure of usr1a usr1b usr1c usr2a usr2b usr2c to...
A b c Each of the three collections stores a copy of usr1 and usr2 data...?