In article <891a98fa-c398-455a-981f-bf72af772...@s36g2000prh.googlegroups.com>, Jeremy <jlcon...@gmail.com> wrote: > >I have lots of data that I currently store in dictionaries. However, >the memory requirements are becoming a problem. I am considering >using a database of some sorts instead, but I have never used them >before. Would a database be more memory efficient than a dictionary? >I also need platform independence without having to install a database >and Python interface on all the platforms I'll be using. Is there >something built-in to Python that will allow me to do this?
If you're serious about needing both a disk-based backing store *and* getting maximum use/performance from your RAM, you probably will need to combine memcached with one of the other solutions offered. But given your other requirement of not installing a DB, your best option will certainly be SQLite. You can use :memory: databases, but that will require shuttling data to disk manually. I suggest that you start with plain SQLite and only worry if you prove (repeat, PROVE) that DB is your bottleneck. -- Aahz (a...@pythoncraft.com) <*> http://www.pythoncraft.com/ "Many customs in this life persist because they ease friction and promote productivity as a result of universal agreement, and whether they are precisely the optimal choices is much less important." --Henry Spencer -- http://mail.python.org/mailman/listinfo/python-list