OSDN Git Service

プロフィール更新時のクエリーを最適化した
authorkonekoneko <jbh03215@hotmail.co.jp>
Sat, 1 Jun 2013 15:45:17 +0000 (00:45 +0900)
committerkonekoneko <jbh03215@hotmail.co.jp>
Sat, 1 Jun 2013 15:45:17 +0000 (00:45 +0900)
.gitignore
profile.js

index 8024d50..f07ccec 100644 (file)
@@ -1,3 +1,5 @@
 /node_modules
 /log
 /ipbanlist.txt
+
+/inited
index 5957f71..20a069b 100644 (file)
@@ -295,7 +295,7 @@ function ProfileCollection()
        }\r
        this.UpdatAsync = function(name,data,cb){\r
                var item = GetItem(data);\r
-               pool.query("UPDATE profilelist SET ? WHERE name = ?",[item,name],cb);\r
+               pool.query("UPDATE profilelist SET ? WHERE name_hash = ? and name = ?",[item,murmurhash.v3(name),name],cb);\r
        }\r
        this.ClearAsync = function(cb){\r
                pool.query("TRUNCATE TABLE profilelist",null,cb);\r