caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Richard Jones <rich@annexia.org>
To: Gabriel Kerneis <kerneis@enst.fr>
Cc: caml-list@yquem.inria.fr
Subject: Re: [Caml-list] Long-term storage of values
Date: Fri, 29 Feb 2008 11:44:53 +0000	[thread overview]
Message-ID: <20080229114453.GA19532@annexia.org> (raw)
In-Reply-To: <20080229084000.2d3a95fe@tatanka.kerneis.info>

On Fri, Feb 29, 2008 at 08:40:00AM +0100, Gabriel Kerneis wrote:
> Hello,
> 
> Le Thu, 28 Feb 2008 20:14:27 -0500 (EST), Brian Hurt <bhurt@spnz.org> a
> écrit :
> > So, mistake number one: either use the data, and structure your data
> > (at that layer) to take advantage of it, or don't use a database.
> > [...]
> > So that's mistake number two: you're communicating between different 
> > versions of the program with an ill-defined (at best) and not 
> > generic protocol/file format.
> 
> Right. But imagine you're communicating with yourself (saving and
> restoring data). And you need to retrieve the data *efficiently*.
> Converting from a generic file format is not efficient - not if you have
> to retrieve the data 100 times per second (imagine a CMS on a popular
> website). It would be faster to use an internal file format. And, of
> course, keeping a backup in a generic file format.

But there are plenty of database-backed websites out there which
perform well[1].

Of course you have to understand databases, optimization of databases,
connection pooling, appropriate use of stored procedures,
denormalizing and occasionally even caching data outside the database.
So as with many things in life you need to know what you're doing.

A good first step for PostgreSQL is to use and understand the "VACUUM"
and "EXPLAIN" commands, and to turn on statement logging (with
timestamps) so you can see which queries are consuming the most time.

OCaml even has type-safe bindings to PostgreSQL ...

Rich.

[1] Some good books on the general issues involved:
http://www.amazon.co.uk/Building-Scalable-Web-Sites-Henderson/dp/0596102356
http://www.amazon.co.uk/Speed-Up-Your-Site-Optimization/dp/0735713243

-- 
Richard Jones
Red Hat


  parent reply	other threads:[~2008-02-29 11:44 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-02-28 18:41 Dario Teixeira
2008-02-28 20:01 ` [Caml-list] " David MENTRE
2008-02-28 20:01 ` Thomas Fischbacher
2008-02-28 20:05 ` Mathias Kende
2008-02-28 22:09 ` Basile STARYNKEVITCH
2008-02-29 14:45   ` Martin Jambon
2008-02-29 19:09     ` Jake Donham
2008-02-28 23:42 ` Erik de Castro Lopo
2008-02-29  1:14 ` Brian Hurt
2008-02-29  7:40   ` Gabriel Kerneis
2008-02-29 10:19     ` Berke Durak
2008-02-29 18:05       ` Markus Mottl
2008-02-29 11:44     ` Richard Jones [this message]
2008-02-29 14:09       ` Brian Hurt
2008-03-01 14:15   ` Dario Teixeira
2008-03-20 21:03 ` Dario Teixeira
2008-03-20 21:32   ` Martin Jambon
2008-03-20 22:41     ` Dario Teixeira
2008-03-20 23:00       ` Martin Jambon
2008-03-21 14:01         ` Dario Teixeira
2008-03-21 14:28           ` Martin Jambon
2008-03-21 14:34             ` Martin Jambon
2008-03-20 21:42   ` Daniel Bünzli
2008-03-20 22:33     ` Dario Teixeira
2008-03-20 21:43   ` Gerd Stolpmann
2008-03-21 14:37     ` Dario Teixeira
2008-03-21 15:24       ` Richard Jones
2008-03-22 12:14         ` David MENTRE
2008-03-21 16:04       ` Gerd Stolpmann
2008-03-21 10:32   ` Berke Durak

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20080229114453.GA19532@annexia.org \
    --to=rich@annexia.org \
    --cc=caml-list@yquem.inria.fr \
    --cc=kerneis@enst.fr \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).