MYSQL就像导致丢失连接一样

时间:2014-01-06 22:50:33

标签: mysql

我正在运行此查询

SELECT 
    friends.*, users.username, users.profile, users_groups.id
FROM 
    friends, users, users_groups 
WHERE 
    friends.uid=$logged_id AND friends.who=users.id 
    AND
        (
            users.username LIKE '%$search%' OR
            users.first_name LIKE '%$search%' OR
            users.last_name LIKE '%$search%'
        )
LIMIT 
    $start, $min

然而我收到了这个:

Error Number: 2013

Lost connection to MySQL server during query

如果我从查询中删除LIKE语句就可以了

1 个答案:

答案 0 :(得分:0)

也许这是一张大桌子而LIKE会引发超时。