在Mathematica中使用MySQL数据库 [英] Using MySQL databases in Mathematica
问题描述
我已经看到可以使用输入需求[DatabaseLink
]和 conn = OpenSQLConnection [ JDBC [MySQL(Connector / J),yourserver / yourdatabase],用户名 - > yourusername,Password - > yourpassword]
(如果有人想试试)。顺便说一句,DatabaseLink的文档这里。
I've seen it's possible to make a connection between Mathematica and MySQL databases using Input Needs["DatabaseLink
"] and conn = OpenSQLConnection[JDBC["MySQL(Connector/J)", "yourserver/yourdatabase"], "Username" -> "yourusername", "Password" -> "yourpassword"]
(in case anyone wants to give it a try). Documentation of DatabaseLink here, by the way.
有没有人以这种方式使用Mathematica的经验,可能要分析数据库中包含的数据?是否有明显的缺点(速度,需要的内存等)?
Does anyone have experience using Mathematica in this way, probably to analyze data contained in the database? Are there obvious drawbacks (speed, memory needed, etc.)?
推荐答案
我最近使用数据库加速< $ c> Manipulate [] 阻止。
I recently used databases to speed up a Manipulate[]
block.
没有数据库,内存中需要一个150 MB ASCII文件的基本数据。因此, Manipulate []
块减慢了。可能 PackedArray []
会有帮助。
Without the database, essential data from a 150 MB ASCII file were required in memory for access. As a result, the Manipulate[]
block slowed down. It's possible that PackedArray[]
would have helped. I didn't investigate this.
对于数据库,单个数据集的访问速度比选择[]
block,但是内存占用下降了近10倍。
With the database, the speed of access of individual datasets is slightly slower than a Select[]
block, but the memory footprint is down by a factor of nearly 10.
我会说的。
这篇关于在Mathematica中使用MySQL数据库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!