dbTalk Databases Forums  

In-memory PostgreSQL database

comp.databases.postgresql comp.databases.postgresql


Discuss In-memory PostgreSQL database in the comp.databases.postgresql forum.



Reply
 
Thread Tools Display Modes
  #11  
Old   
Marco Mariani
 
Posts: n/a

Default Re: In-memory PostgreSQL database - 05-14-2008 , 04:41 AM






Ben Finney wrote:

Quote:
What options are there for creating and connnecting to a PostgreSQL
database that exists only in memory, similar to the same thing in
SQLite (and, I believe, MySQL)?
I don't think you would gain anything by keeping the DB in RAM with
postgres, because it's CPU-bound if there is little data.

If the test DB fits in RAM, this means Postgres already leverages the
memory as cache (if configured properly)

In my current application, I truncate and refill all the tables after
each of the 500 test.

I tried creating a tablespace in ramdisk, and had no performance
improvement at all.



Reply With Quote
  #12  
Old   
Marco Mariani
 
Posts: n/a

Default Re: In-memory PostgreSQL database - 05-14-2008 , 04:41 AM






Ben Finney wrote:

Quote:
What options are there for creating and connnecting to a PostgreSQL
database that exists only in memory, similar to the same thing in
SQLite (and, I believe, MySQL)?
I don't think you would gain anything by keeping the DB in RAM with
postgres, because it's CPU-bound if there is little data.

If the test DB fits in RAM, this means Postgres already leverages the
memory as cache (if configured properly)

In my current application, I truncate and refill all the tables after
each of the 500 test.

I tried creating a tablespace in ramdisk, and had no performance
improvement at all.



Reply With Quote
  #13  
Old   
Marco Mariani
 
Posts: n/a

Default Re: In-memory PostgreSQL database - 05-14-2008 , 04:41 AM



Ben Finney wrote:

Quote:
What options are there for creating and connnecting to a PostgreSQL
database that exists only in memory, similar to the same thing in
SQLite (and, I believe, MySQL)?
I don't think you would gain anything by keeping the DB in RAM with
postgres, because it's CPU-bound if there is little data.

If the test DB fits in RAM, this means Postgres already leverages the
memory as cache (if configured properly)

In my current application, I truncate and refill all the tables after
each of the 500 test.

I tried creating a tablespace in ramdisk, and had no performance
improvement at all.



Reply With Quote
  #14  
Old   
Marco Mariani
 
Posts: n/a

Default Re: In-memory PostgreSQL database - 05-14-2008 , 04:41 AM



Ben Finney wrote:

Quote:
What options are there for creating and connnecting to a PostgreSQL
database that exists only in memory, similar to the same thing in
SQLite (and, I believe, MySQL)?
I don't think you would gain anything by keeping the DB in RAM with
postgres, because it's CPU-bound if there is little data.

If the test DB fits in RAM, this means Postgres already leverages the
memory as cache (if configured properly)

In my current application, I truncate and refill all the tables after
each of the 500 test.

I tried creating a tablespace in ramdisk, and had no performance
improvement at all.



Reply With Quote
  #15  
Old   
Marco Mariani
 
Posts: n/a

Default Re: In-memory PostgreSQL database - 05-14-2008 , 04:41 AM



Ben Finney wrote:

Quote:
What options are there for creating and connnecting to a PostgreSQL
database that exists only in memory, similar to the same thing in
SQLite (and, I believe, MySQL)?
I don't think you would gain anything by keeping the DB in RAM with
postgres, because it's CPU-bound if there is little data.

If the test DB fits in RAM, this means Postgres already leverages the
memory as cache (if configured properly)

In my current application, I truncate and refill all the tables after
each of the 500 test.

I tried creating a tablespace in ramdisk, and had no performance
improvement at all.



Reply With Quote
  #16  
Old   
Marco Mariani
 
Posts: n/a

Default Re: In-memory PostgreSQL database - 05-14-2008 , 04:41 AM



Ben Finney wrote:

Quote:
What options are there for creating and connnecting to a PostgreSQL
database that exists only in memory, similar to the same thing in
SQLite (and, I believe, MySQL)?
I don't think you would gain anything by keeping the DB in RAM with
postgres, because it's CPU-bound if there is little data.

If the test DB fits in RAM, this means Postgres already leverages the
memory as cache (if configured properly)

In my current application, I truncate and refill all the tables after
each of the 500 test.

I tried creating a tablespace in ramdisk, and had no performance
improvement at all.



Reply With Quote
  #17  
Old   
Marco Mariani
 
Posts: n/a

Default Re: In-memory PostgreSQL database - 05-14-2008 , 04:41 AM



Ben Finney wrote:

Quote:
What options are there for creating and connnecting to a PostgreSQL
database that exists only in memory, similar to the same thing in
SQLite (and, I believe, MySQL)?
I don't think you would gain anything by keeping the DB in RAM with
postgres, because it's CPU-bound if there is little data.

If the test DB fits in RAM, this means Postgres already leverages the
memory as cache (if configured properly)

In my current application, I truncate and refill all the tables after
each of the 500 test.

I tried creating a tablespace in ramdisk, and had no performance
improvement at all.



Reply With Quote
  #18  
Old   
Marco Mariani
 
Posts: n/a

Default Re: In-memory PostgreSQL database - 05-14-2008 , 04:46 AM



Laurenz Albe wrote:

Quote:
I am very surprised that you even consider running unit tests with
anything else than the database you want to use in production. Doesn't
that take away much of the benefits of unit testing?
Not if the DB schema has been evolved with "emergent design" and makes
no use of triggers, stored procedures, advanced check constraints... if
you design an app like some of the youngsters do, the only difference
between sqlite and postgres is that the latter has better support for
unicode ;-)



Reply With Quote
  #19  
Old   
Marco Mariani
 
Posts: n/a

Default Re: In-memory PostgreSQL database - 05-14-2008 , 04:46 AM



Laurenz Albe wrote:

Quote:
I am very surprised that you even consider running unit tests with
anything else than the database you want to use in production. Doesn't
that take away much of the benefits of unit testing?
Not if the DB schema has been evolved with "emergent design" and makes
no use of triggers, stored procedures, advanced check constraints... if
you design an app like some of the youngsters do, the only difference
between sqlite and postgres is that the latter has better support for
unicode ;-)



Reply With Quote
  #20  
Old   
Marco Mariani
 
Posts: n/a

Default Re: In-memory PostgreSQL database - 05-14-2008 , 04:46 AM



Laurenz Albe wrote:

Quote:
I am very surprised that you even consider running unit tests with
anything else than the database you want to use in production. Doesn't
that take away much of the benefits of unit testing?
Not if the DB schema has been evolved with "emergent design" and makes
no use of triggers, stored procedures, advanced check constraints... if
you design an app like some of the youngsters do, the only difference
between sqlite and postgres is that the latter has better support for
unicode ;-)



Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.