LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (http://www.linuxquestions.org/questions/programming-9/)
-   -   In Memory SQL type tables (http://www.linuxquestions.org/questions/programming-9/in-memory-sql-type-tables-461099/)

koodoo 07-05-2006 02:20 AM

In Memory SQL type tables
 
Hi,

I am looking for a way to implement In Memory Tables. I have a some data that I need to access quite fast, but I also need the functionality that an SQL table offers me. Eg Querries for searching, etc. So is there any way I can load an SQL type table into memory and then Querry that table?.

I could implement, say some dyanamic data stuctures and then write some operations for them, but that seems to be a lot of work. Moreover I would have to make a lot of changes in my existing code. What I am looking for here is that, in the normal case when my prog executes a Querry from a table, that table is on the disk and so the Querry takes time. I was tinking if there was some way to load that same same table into memory and then Querry it from there.

Thanks in anticipation.

r0b0 07-05-2006 04:02 AM

All operating systems cache files to memory. So I think you can just place your database in a file and the operationg system will take care of the performance.
You won't really gain anything trying to re-invent things that have already been used for tens of years now.

koodoo 08-05-2006 03:55 AM

Hi,
Sorry for such a late reply. Actually I was away for sometime so couldn't reply.

I think you didn't quite get what I was trying to accomplish. I had posted a similar question on cprogramming.com and got a very good reply.

Here's a link to the thread.

Here are some more links for someone who might be facing the same problem:
1) This is the SQLITE home page.

2) http://www.sqlite.org/cvstrac/wiki
Go to "Information On SQLite Internals"--->"InMemoryDatabase: Notes on how to use SQLite for in-memory tables."

Thanks anyways.


All times are GMT -5. The time now is 05:47 AM.