Rumah > pembangunan bahagian belakang > tutorial php > mysql 被写入1W数据后无法select*from table,但是加入limit参数后可以查询

mysql 被写入1W数据后无法select*from table,但是加入limit参数后可以查询

WBOY
Lepaskan: 2016-06-06 20:34:23
asal
1205 orang telah melayarinya

数据库表结构 innodb

SELECT 查询错误提示

<code>ERROR 2013 (HY000): Lost connection to MySQL server during query
</code>
Salin selepas log masuk
Salin selepas log masuk

我觉得可能是 SELECT 执行时间过长,所以报错.

mysql 日志

<code>150414 03:11:26 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
150414  3:11:27  InnoDB: Initializing buffer pool, size = 8.0M
150414  3:11:27  InnoDB: Completed initialization of buffer pool
InnoDB: The first specified data file ./ibdata1 did not exist:
InnoDB: a new database to be created!
150414  3:11:27  InnoDB: Setting file ./ibdata1 size to 10 MB
InnoDB: Database physically writes the file full: wait...
150414  3:11:27  InnoDB: Log file ./ib_logfile0 did not exist: new to be created
InnoDB: Setting log file ./ib_logfile0 size to 5 MB
InnoDB: Database physically writes the file full: wait...
150414  3:11:27  InnoDB: Log file ./ib_logfile1 did not exist: new to be created
InnoDB: Setting log file ./ib_logfile1 size to 5 MB
InnoDB: Database physically writes the file full: wait...
InnoDB: Doublewrite buffer not found: creating new
InnoDB: Doublewrite buffer created
InnoDB: Creating foreign key constraint system tables
InnoDB: Foreign key constraint system tables created
150414  3:11:27  InnoDB: Started; log sequence number 0 0
150414  3:11:27 [Note] Event Scheduler: Loaded 0 events
150414  3:11:27 [Note] /usr/libexec/mysqld: ready for connections.
</code>
Salin selepas log masuk
Salin selepas log masuk

回复内容:

数据库表结构 innodb

SELECT 查询错误提示

<code>ERROR 2013 (HY000): Lost connection to MySQL server during query
</code>
Salin selepas log masuk
Salin selepas log masuk

我觉得可能是 SELECT 执行时间过长,所以报错.

mysql 日志

<code>150414 03:11:26 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
150414  3:11:27  InnoDB: Initializing buffer pool, size = 8.0M
150414  3:11:27  InnoDB: Completed initialization of buffer pool
InnoDB: The first specified data file ./ibdata1 did not exist:
InnoDB: a new database to be created!
150414  3:11:27  InnoDB: Setting file ./ibdata1 size to 10 MB
InnoDB: Database physically writes the file full: wait...
150414  3:11:27  InnoDB: Log file ./ib_logfile0 did not exist: new to be created
InnoDB: Setting log file ./ib_logfile0 size to 5 MB
InnoDB: Database physically writes the file full: wait...
150414  3:11:27  InnoDB: Log file ./ib_logfile1 did not exist: new to be created
InnoDB: Setting log file ./ib_logfile1 size to 5 MB
InnoDB: Database physically writes the file full: wait...
InnoDB: Doublewrite buffer not found: creating new
InnoDB: Doublewrite buffer created
InnoDB: Creating foreign key constraint system tables
InnoDB: Foreign key constraint system tables created
150414  3:11:27  InnoDB: Started; log sequence number 0 0
150414  3:11:27 [Note] Event Scheduler: Loaded 0 events
150414  3:11:27 [Note] /usr/libexec/mysqld: ready for connections.
</code>
Salin selepas log masuk
Salin selepas log masuk

把表repair一下

Label berkaitan:
sumber:php.cn
Kenyataan Laman Web ini
Kandungan artikel ini disumbangkan secara sukarela oleh netizen, dan hak cipta adalah milik pengarang asal. Laman web ini tidak memikul tanggungjawab undang-undang yang sepadan. Jika anda menemui sebarang kandungan yang disyaki plagiarisme atau pelanggaran, sila hubungi admin@php.cn
Tutorial Popular
Lagi>
Muat turun terkini
Lagi>
kesan web
Kod sumber laman web
Bahan laman web
Templat hujung hadapan