In linux you can create an "in memory database" with postgresql using a ramdisk. Quoting from a thread in postgresql mailing list:
In my opinion very nice solution is
building part of PostgreSQL database
in memory - below it is instruction
how to build PostgreSQL schema in
memory in Linux. I tested this with my
ROLAP solution for recalculation MOLAP
cubes in memory and then join with
master cube (this speeds up proces
about 10 times!!! - but in other
solution may be different).
In grub (or other bootloader) you must
declare ramdisk and then in OS:
mke2fs /dev/ram0
mkdir /mnt/ram0
mount /dev/ram0 /mnt/ram0
mkdir /mnt/ram0/pgspace
chown postgres:postgres mnt/ram0/pgspace
The "/mnt/ram0/pgspace" folder must be
empty (ERROR: directory "/mnt/ram0"
is not empty)
And then you may create tables (in
this schema of course) and write to
them.
I didn't tried this, I'm not 100% sure that this works without problems. Note also that in the same thread they suggest other db engine with in memory support, but no mention about DATE
function. Other rdbms could benefit from ramdisk also if they have support for table space.
EDIT
Ex:
CREATE TABLESPACE inram LOCATION '/mnt/ram0/pgspace';
CREATE TABLE foo(i int) TABLESPACE inram;
foo
table now should be an in-memory table.