性能优化
This commit is contained in:
+1
@@ -0,0 +1 @@
|
|||||||
|
alter table t_friend_request add index `friend_request_uid_index` (`_friend_uid`);
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
alter table t_friend_request add index `friend_request_uid_index` (`_friend_uid`);
|
||||||
@@ -2223,7 +2223,14 @@ public class DatabaseStore {
|
|||||||
", `_status`" +
|
", `_status`" +
|
||||||
", `_dt`" +
|
", `_dt`" +
|
||||||
", `_from_read_status`" +
|
", `_from_read_status`" +
|
||||||
", `_to_read_status` from t_friend_request where `_uid` = ? or `_friend_uid` = ?";
|
", `_to_read_status` from t_friend_request where `_uid` = ? UNION ALL " +
|
||||||
|
"select `_uid`" +
|
||||||
|
", `_friend_uid`" +
|
||||||
|
", `_reason`" +
|
||||||
|
", `_status`" +
|
||||||
|
", `_dt`" +
|
||||||
|
", `_from_read_status`" +
|
||||||
|
", `_to_read_status` from t_friend_request where `_friend_uid` = ?";
|
||||||
statement = connection.prepareStatement(sql);
|
statement = connection.prepareStatement(sql);
|
||||||
|
|
||||||
int index = 1;
|
int index = 1;
|
||||||
|
|||||||
Reference in New Issue
Block a user