Selecting between shelve and sqlite for really large dictionary (Python) -


i have large python dictionary of vectors (150k vectors, 10k dimensions each) of float numbers can't loaded memory, have use 1 of 2 methods storing on disk , retrieving specific vectors when appropriate. vectors created , stored once, might read many (thousands of) times -- important have efficient reading. after tests shelve module, tend believe sqlite better option kind of task, before start writing code hear more opinions on this... example, there other options except of 2 i'm not aware of?

now, assuming agree best option sqlite, question relates exact form of table. i'm thinking of using fine-grained structure rows of form vector_key, element_no, value efficient pagination, instead of storing 10k elements of vector same record. appreciate suggestions on issue.

you want sqlite3, if use orm sqlalchemy can grow expand , use other end databases.

shelve more of "toy" useful in production code.

the other point talking called normalization , have never been @ this should explain you.

just note this shows performance failures in shelve vs sqlite3


Comments

Popular posts from this blog

java - Play! framework 2.0: How to display multiple image? -

gmail - Is there any documentation for read-only access to the Google Contacts API? -

php - Controller/JToolBar not working in Joomla 2.5 -