Search Postgresql Archives

Re: Is there a way to run tables in RAM?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 13 Jul 2006 14:32:42 -0700, Karen Hill <karen_hill22@xxxxxxxxx> wrote:

Roy Souther wrote:
> I would like to know if there is anyway to move a section of some tables
> into RAM to work on them.
>
> I have large table, about 700MB or so and growing. I also have a bizarre
> collection of queries that run hundreds of queries on a small section of
> this table. These queries only look at about 100 or so records at a time
> and they run hundreds of queries on the data looking for patterns. This
> causes the program to run very slowly because of hard drive access time.
> Some times it needs to write changes back to the records it is working
> with.

If you are using linux, create a ramdisk and then add a Postgresql
tablespace to that.

I don't think this will help much.  While the ramdisk might be better
than the o/s file cache, it just limits the o/s ability to give memory
to other things.  Any modern o/s essentially has a giant ram disk that
runs all the time.  It dynamically resizes it depending on what is
going on at the time.  It is smart enough to keep frequently used
portions of file in ram all the time and less frequently used portions
on disk to free up memory for sorting, etc.

if fast write access is needed (no syncs), just create a temp table.
just let the operating system do it's thing. if the table is
thrashing, you have two choices, optimize the database to be more
cache friendly or buy more ram.

merlin


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux