Thread: Other JDBC Performance Question
I am using JDBC quite happily and thank you Peter. I have a case where the database is pretty small and the quickest response possible is more important than usual. The whole database is about 2mb or so with lots of different record key combinations. I notice that, even using psql, that each time I do a query, even the same query, the disk is accessed. What I would really like is to somehow force the database to be RAM resident, but still access it using SQL. I am about to write some code to load the whole thing up into RAM and accessing it some special way without SQL, but it really isn't what I want to do. Is there any way to force the database to be RAM resident? Either with this package or something else? I'd appreciate any feedback on how to very quickly access small databases using SQL. Thanks. _________________________________ Frank Morton (fmorton@base2inc.com) Voice: (317) 876-3355 FAX: (317) 876-3398 Home: (317) 574-0815
Frank Morton wrote: > Is there any way to force the database to be RAM > resident? Either with this package or something > else? Perhaps you could make a virtual drive, copy over your database, and then point postgresql to that database. I would make two databases... the first one is your 'transaction' database on the hard drive, and the second one is a 'report' database for frequent queries. You can have a cron job update the report database from the transaction database on a periodic basis. Also, I'd take advantage of the opportunity and de-normalize the reporting database to make the queries even faster. Just suggestions, :) Clark
On: Mon, 22 Mar 1999 08:37:33 -0500 > "Frank Morton" <fmorton@base2inc.com> wrote: > ... > What I would really like is to somehow force the > database to be RAM resident, but still access it > using SQL. I am about to write some code to > load the whole thing up into RAM and accessing > it some special way without SQL, but it really > isn't what I want to do. > > Is there any way to force the database to be RAM > resident? Either with this package or something > else? > I don't know of a good way to speed up Postgresql access, but if the DB is really so small, why not "speed up the hardware" and use a RAM disk? I don't know about other UNIXs, but I believe Linux allows you to create a RAM disk (I know it does at boot time; I haven't looked into using one at run time). Mark (mdalphin@amgen.com)