Re: Optimise PostgreSQL for fast testing

From: Dmytrii Nagirniak <dnagir(at)gmail(dot)com>
To: Adrian Klaver <adrian(dot)klaver(at)gmail(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Optimise PostgreSQL for fast testing
Date: 2012-02-24 00:00:08
Message-ID: 80D83060-25F0-46FB-856F-50503B174C25@gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general


On 24/02/2012, at 2:06 AM, Adrian Klaver wrote:

>>
>> Would appreciate some suggestions.
>
> Not enough information to make suggestions.

Jack Christensen pretty nailed it very well. But I'll answer the particulars here too:

> Why are you switching databases?
Need FTS from PG. No other reasons yet.

> What are the specs?
A typical DB spec (test) does the following:
1. Creates a number of records (commonly about 5-ish, but may vary from 1 to ~40 across all tables).
2. Executes some queries against the dataset (**MOST** of them are pretty simple, with only 1-2 joins; only some queries use 5-ish joins, sorting, distinct etc).
3. May update couple of records too (we are talking about a couple only, so it in the range of 1-5, very rarely ~20-30).
4. At the end a spec truncates all the tables (uses truncate, not delete).

This repeats on every spec/test (hundreds of those).

> What is the application?

As I said, it is a typical Rails web application.
But for the purpose of this thread it is irrelevant since we're basically talking about single user, development/test environment where the only user of the app is the "spec/test" and no concurrency.

> What is the use case?
> Single user?
> Networked, multiple user?
See above.

> Do you see the application/database growing?
No. As I said before the database is used ONLY for running tests and can be recreated at any time.
Generally it will never have any data in it (except when specs are running).

Cheers.

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Harvey, Allan AC 2012-02-24 00:00:46 Re: psql latex and newlines
Previous Message Dmytrii Nagirniak 2012-02-23 23:48:58 Re: Optimise PostgreSQL for fast testing