kingofhawks / stocktrace

stock market analysis
5 stars 3 forks source link

mongoengine performance issue #105

Closed kingofhawks closed 6 years ago

kingofhawks commented 6 years ago
    Equity.objects(name=name, date=day).update_one(code=code, date=day, name=name,
                                                   code1=code1, code2=code2, code3=code3,
                                                   code4=code4,
                                                   pe=pe, pe_ttm=pe_ttm, pb=pb,
                                                   dividend_yield_ratio=dyr, upsert=True)

took more than 500ms

kingofhawks commented 6 years ago

db.equity.createIndex({code:1,date:1}) db.equity.createIndex({code:1})