**已关闭。**此问题为off-topic。它目前不接受回答。
希望改进此问题?Update the question,所以Stack Overflow的on-topic。
10年前就关门了。
Improve this question的
我对HDF 5性能和并发性有以下问题:
- HDF 5是否支持并发写访问?
1.先不考虑并发性,HDF 5在I/O性能方面的表现如何(压缩率是否会影响性能)?
1.由于我使用HDF 5和Python,它的性能与Sqlite相比如何?
参考文献:
- http://www.sqlite.org/faq.html#q5
- Locking sqlite file on NFS filesystem possible?的
- http://pandas.pydata.org/的
2条答案
按热度按时间brc7rcf01#
更新为使用pandas 0.13.1
1.不可以。http://pandas.pydata.org/pandas-docs/dev/io.html#notes-caveats。让不同的线程/进程写出计算结果,然后让单个进程合并。
1.根据您存储的数据类型、存储方式以及检索方式,HDF 5可以提供更好的性能。在
HDFStore
中作为单个数组存储浮点数据,压缩(换句话说,不以允许查询的格式存储),将以惊人的速度存储/读取。即使以表格格式存储(这会降低写入性能),也会提供相当好的写入性能。您可以查看这一点以进行一些详细的比较(这是HDFStore
在后台使用的)。http://www.pytables.org/,这里有一个很好的图片:x1c 0d1x的数据从PyTables 2.3开始,查询现在被索引了,所以性能实际上比这好得多。
为了回答你的问题,如果你想要任何类型的性能,HDF 5是要走的路。
写作:
字符串
阅读
型
这是密码
型
当然是YMMV。
wlwcrazw2#
看看
pytables
,他们可能已经为你做了很多这样的跑腿工作。也就是说,我不完全清楚如何比较hdf和sqlite。
hdf
是一个通用的分层数据文件格式+库,sqlite
是一个关系数据库。hdf
确实支持c
级别的并行I/O,但我不确定h5py
封装了多少,也不确定它是否能很好地处理NFS。如果你真的想要一个高并发的关系数据库,为什么不使用真正的SQL服务器呢?