From: | Neil Conway <nconway(at)klamath(dot)dyndns(dot)org> |
---|---|
To: | pgsql-general(at)postgresql(dot)org |
Cc: | gateley(at)jriver(dot)com |
Subject: | Re: DELETE and efficiency |
Date: | 2001-03-06 22:05:26 |
Message-ID: | 20010306170526.A307@klamath.dyndns.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On Tue, Mar 06, 2001 at 03:21:19PM -0600, gateley(at)jriver(dot)com wrote:
> I am working on an application with
> very dynamic data: it gets added and
> deleted often. How effecient are the
> searches in this situation?
[...]
> Is using DELETE going to kill my performance?
In short, no.
I don't think so, at any rate. A DELETE is just like any query, so
you'll need to fine tune the queries, make indexes, look at the output
of EXPLAIN, etc. But I can't see why a DELETE would be any slower than
most other queries.
But as I understand it, a DELETE just marks the row as deleted -- the
data is not actually removed from disk. This means they should be
fast, but it also means that doing a VACUUM [ANALYZE] fairly regularly
is probably a good idea.
HTH,
Neil
--
Neil Conway <neilconway(at)home(dot)com>
Get my GnuPG key from: http://klamath.dyndns.org/mykey.asc
Encrypted mail welcomed
You can use facts to prove anything that's even remotely true.
-- Homer J. Simpson
From | Date | Subject | |
---|---|---|---|
Next Message | Michelle Murrain | 2001-03-06 22:08:41 | Re: DELETE and efficiency |
Previous Message | Tom Lane | 2001-03-06 21:58:09 | Re: max(field) vs select field .. order by desc limit 1 |