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]

 



-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

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.
> 
> Is there anyway that I can move a few hundred records of the table into
> RAM and work on it there, it would be much faster.
> 
> Is there anyway to create a temporary table that will only exist in RAM
> and not be written to the hard drive? Or do temporary tables already do
> that?
> 
> If I can use a temporary table this way is there any simple way to merge
> the changes back into the original table?

What if you COPY OUT, sort(1) by the most common fields in the WHERE
clauses, and COPY IN the data?

That way, you get locality of data, and so the desired data is more
likely to be in the OS block cache?

- --
Ron Johnson, Jr.
Jefferson LA  USA

Is "common sense" really valid?
For example, it is "common sense" to white-power racists that
whites are superior to blacks, and that those with brown skins
are mud people.
However, that "common sense" is obviously wrong.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.3 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFEtsY7S9HxQb37XmcRAtXEAKCQKW6fxRKPlSrnsVhmcsvdLCRU+wCcCKLK
FTlvERCCH/ylgVbI2EwujBc=
=KRzE
-----END PGP SIGNATURE-----


[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