pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Bruce Momjian <pgman@candle.pha.pa.us>
To: The Hermit Hacker <scrappy@hub.org>
Cc: pgsql-sql@postgreSQL.org
Subject: Re: [SQL] More efficient DELETE ... ?
Date: Sat, 22 Jan 2000 12:56:59 -0500 (EST)
Message-ID: <200001221756.MAA22581@candle.pha.pa.us> (raw)
In-Reply-To: <Pine.BSF.4.21.0001221316390.79710-100000@thelab.hub.org>

> 
> This looks painful ...
> 
> DELETE FROM webhit_referer_raw
>       WHERE oid IN ( SELECT w.oid
>                        FROM webhit_referer_raw w, referrer_data r
>                       WHERE stat_date < 'Jan 17 2000 15:05:00'
>                         AND w.referrer_url = r.referrer );
> 
> But, reading through the man page, it looks like this about the only way
> of doing it?  Or am I missing something as obvious as the UPDATE I asked
> about the other day? :(

Read chapter 8 from my book.  That is the only way for DELETE.  You
could to EXISTS and that may be faster.


-- 
  Bruce Momjian                        |  http://www.op.net/~candle
  pgman@candle.pha.pa.us               |  (610) 853-3000
  +  If your life is a hard drive,     |  830 Blythe Avenue
  +  Christ can be your backup.        |  Drexel Hill, Pennsylvania 19026



view thread (7+ messages)  latest in thread

Message-ID: <200001221756.MAA22581@candle.pha.pa.us>
Permalink:  ../200001221756.MAA22581@candle.pha.pa.us/
Also on:    postgresql.org/message-id/200001221756.MAA22581@candle.pha.pa.us

 · 

reply

Reply instructions:

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

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-sql@postgresql.org
  Cc: pgman@candle.pha.pa.us, scrappy@hub.org
  Subject: Re: [SQL] More efficient DELETE ... ?
  In-Reply-To: <200001221756.MAA22581@candle.pha.pa.us>
  References: <Pine.BSF.4.21.0001221316390.79710-100000@thelab.hub.org> <200001221756.MAA22581@candle.pha.pa.us>

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

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox