Pysqlite tables in RAM

John Salerno johnjsal at
Fri Sep 29 16:00:25 CEST 2006

Ranjitha wrote:
> Hi all,
> I'm relatively new to python and am facing a problem with database
> access
> I want to store my data in a database on the disk. I also want to be
> able to reload the tables into the RAM whenever I have a lot of disk
> accesses and commit the changes back to the database. There is an
> option of storing the data in the RAM where you connect to :memory:
> instead of a DB file. The problem with this is that the data is lost
> everytime you close the connection to the database. Could somebody
> suggest a way to load the tables into the RAM as tables and not as some
> lists or dictionaries?
> Thanks,
> Simba

Just a side note: judging from your subject line, are you using the 
pysqlite extension? In case you are, SQLite support comes with the 
standard library in 2.5 as sqlite3, in case you want to switch.

More information about the Python-list mailing list