realglobe-Inc / clay-driver-sequelize

Clay driver for Sequelize
Apache License 2.0
1 stars 1 forks source link

updateの速度改善 #45

Closed FujiHaruka closed 7 years ago

FujiHaruka commented 7 years ago

Extra テーブルの更新において key = null となる場合にもクエリを発行していたため、update メソッドを実行すると attributes の数だけ Extra.upsert() が走っていた。

無駄な Extra.upsert() を減らすために、更新の必要ない extraValues をフィルタリングした。

結果。だいたい create と同じ速度になった。

Took 7811ms for 50 entities, 10 attributes to create
Took 7447ms for 50 entities, 10 attributes to update
FujiHaruka commented 7 years ago

https://github.com/realglobe-Inc/claydb/issues/14

FujiHaruka commented 7 years ago

フォークからプルリクしたので Travis は通らない