I'm running a select statement on a table to return all rows where the value in column "NewickSpeciesName" is 'Acanthisitta_chloris':
我正在对一个表运行一条SELECT语句,以返回“NewickSpeciesName”列中的值为‘Acanthisitta_Chloris’的所有行:
SELECT * from PfamAlignments
WHERE
NewickSpeciesName ='Acanthisitta_chloris'
INTO OUTFILE '/home/raymondhon/public/pfamstest.csv'
FIELDS TERMINATED BY ','
ENCLOSED BY '"'
LINES TERMINATED BY '\n';
This returns a csv with some but not all of the rows. Looking at the .cvs, it looks like mysql pulled rows fulfilling my criteria, but only up to a certain value on my key column. That is, in the table, there are rows where "NewickSpeciesName" is "Acanthisitta_chloris" and the key column value is in the multiples of millions.
(https://i.stack.imgur.com/hGCen.png)
这将返回包含部分(但不是全部)行的CSV。查看.cv,看起来MySQL拉出了满足我的条件的行,但仅限于我的键列上的某个值。也就是说,在表中,有一些行的“NewickSpeciesName”是“Acanthisitta_Chloris”,键列的值是百万的倍数。(https://i.stack.imgur.com/hGCen.png))
Whereas, in the .csv, the the largest value in the key column is 322079.
(https://i.stack.imgur.com/3xJPP.png)
而在.csv中,键列中的最大值为322079。(https://i.stack.imgur.com/3xJPP.png))
What might be the cause for this? If it makes any difference, my table has over 11 million rows, and I'm running the mysql script on DBeaver, and I'm SSH tunneling from my local computer to the database I'm accessing.
造成这种情况的原因可能是什么?如果有什么不同的话,那就是我的表有1100多万行,我在DBeaver上运行MySQL脚本,并且从我的本地计算机通过SSH隧道连接到我正在访问的数据库。
更多回答
There are limits to filesystem file sizes, Excel has limits to row counts, and dbeaver has limits to RAM etc. It sounds like you've exceeded one of them.
文件系统文件大小有限制,Excel有行数限制,dbeaver有RAM限制等等。听起来您已经超过了其中之一。
I think it's a feature of Dbeaver that's causing this. I'm currently trying SQL Editor> select all rows. I'll update and close if this works.
我认为这是Dbeaver的一个特点造成的。我目前正在尝试SQL编辑器>选择所有行。如果有效,我将更新并关闭。
优秀答案推荐
DBeaver converts your SQL statement and appends a LIMIT
clause.
To avoid this, set ResultSet Fetch size
in DBeaver settings to -1 (=infinite).
DBeaver转换您的SQL语句并附加一个LIMIT子句。要避免这种情况,请在DBeaver设置中将ResultSet Fetch Size设置为-1(=Infinite)。
更多回答
我是一名优秀的程序员,十分优秀!