大量数据 [英] Large Amount of Data

查看:82
本文介绍了大量数据的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要处理大量数据。数据结构在字典中非常适合

,但数量很大 - 接近或超过物理内存的大小

。我想知道如果我尝试将数据

加载到字典中会发生什么。 Python会使用交换内存还是会失败?

谢谢。

I need to process large amount of data. The data structure fits well
in a dictionary but the amount is large - close to or more than the size
of physical memory. I wonder what will happen if I try to load the data
into a dictionary. Will Python use swap memory or will it fail?

Thanks.

推荐答案

5月25日,10日:上午50点,杰克 < nos ... @ invalid.comwrote:
On May 25, 10:50 am, "Jack" <nos...@invalid.comwrote:

我需要处理大量数据。数据结构在字典中非常适合

,但数量很大 - 接近或超过物理内存的大小

。我想知道如果我尝试将数据

加载到字典中会发生什么。 Python会使用交换内存还是会失败?


谢谢。
I need to process large amount of data. The data structure fits well
in a dictionary but the amount is large - close to or more than the size
of physical memory. I wonder what will happen if I try to load the data
into a dictionary. Will Python use swap memory or will it fail?

Thanks.



操作系统将负责内存交换。它可能会变慢,但我不认为它会失败。


马特

The OS will take care of memory swapping. It might get slow, but I
don''t think it should fail.

Matt


在< H8 ****************************** @ comcast.com> ;,杰克写道:
In <H8******************************@comcast.com>, Jack wrote:

我需要处理大量数据。数据结构在字典中非常适合

,但数量很大 - 接近或超过物理内存的大小

。我想知道如果我尝试将数据

加载到字典中会发生什么。 Python会使用交换内存还是会失败?
I need to process large amount of data. The data structure fits well
in a dictionary but the amount is large - close to or more than the size
of physical memory. I wonder what will happen if I try to load the data
into a dictionary. Will Python use swap memory or will it fail?



如何将数据放入数据库?如果键是字符串

`shelve`模块可能是一个解决方案。


Ciao,

Marc''BlackJack' 'Rintsch

What about putting the data into a database? If the keys are strings the
`shelve` module might be a solution.

Ciao,
Marc ''BlackJack'' Rintsch


感谢您的回复!


数据库对于我想做的事情来说太慢了。


" Marc''BlackJack''Rintsch" < bj **** @ gmx.netwrote in message

news:pa ************************** ** @ gmx.net ...
Thanks for the replies!

Database will be too slow for what I want to do.

"Marc ''BlackJack'' Rintsch" <bj****@gmx.netwrote in message
news:pa****************************@gmx.net...

In< H8 ********************* *********@comcast.com> ;,杰克写道:
In <H8******************************@comcast.com>, Jack wrote:

>我需要处理大量数据。数据结构非常适合字典,但数量很大 - 接近或超过物理内存的大小。我想知道如果我尝试将数据加载到字典中会发生什么。 Python会使用交换内存还是会失败?
>I need to process large amount of data. The data structure fits well
in a dictionary but the amount is large - close to or more than the size
of physical memory. I wonder what will happen if I try to load the data
into a dictionary. Will Python use swap memory or will it fail?



如何将数据放入数据库?如果键是字符串

`shelve`模块可能是一个解决方案。


Ciao,

Marc''BlackJack' 'Rintsch


What about putting the data into a database? If the keys are strings the
`shelve` module might be a solution.

Ciao,
Marc ''BlackJack'' Rintsch



这篇关于大量数据的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆