数据表是 100W条信息。在使用update 更新数据时,返回的结果是 http 500错误。  是因为一次不能操作100W条信息吗?
  第二个问题,能否我选择1-50W条信息更新,请问命令如何写呢?
  我目前的命令:update 表1 set 字段1=000000  

解决方案 »

  1.   

    1 可以
    2 update 表 set ziduan1=0000 where id<50w
      

  2.   

    应该是超时了。
    检查一下你的mysql> show variables like '%timeout%'
        -> ;
    +----------------------------+----------+
    | Variable_name              | Value    |
    +----------------------------+----------+
    | connect_timeout            | 10       |
    | delayed_insert_timeout     | 300      |
    | innodb_lock_wait_timeout   | 50       |
    | innodb_rollback_on_timeout | OFF      |
    | interactive_timeout        | 28800    |
    | lock_wait_timeout          | 31536000 |
    | net_read_timeout           | 30       |
    | net_write_timeout          | 60       |
    | slave_net_timeout          | 3600     |
    | wait_timeout               | 28800    |
    +----------------------------+----------+
    10 rows in set (0.00 sec)mysql>
      

  3.   


    我的配置是:
    mysql> show variables like '%timeout%'
        -> ;
    +----------------------------+----------+
    | Variable_name              | Value    |
    +----------------------------+----------+
    | connect_timeout            | 10       |
    | delayed_insert_timeout     | 300      |
    | innodb_lock_wait_timeout   | 50       |
    | innodb_rollback_on_timeout | OFF      |
    | interactive_timeout        | 28800    |
    | lock_wait_timeout          | 31536000 |
    | net_read_timeout           | 30       |
    | net_write_timeout          | 60       |
    | slave_net_timeout          | 3600     |
    | wait_timeout               | 28800    |
    +----------------------------+----------+
    10 rows in set (0.00 sec)mysql>
    请问配置哪些地方需要改进呢?