Re: delete to slow

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I´ve tried... It takes the same time. I used explain and I saw it... Exactly
the same time.
----- Original Message ----- 
From: "Bruno Wolff III" <bruno@xxxxxxxx>
To: "Ricardo Valença de Assis" <valenca@xxxxxxxxxxxxxxxx>
Cc: <pgsql-admin@xxxxxxxxxxxxxx>
Sent: Wednesday, April 06, 2005 2:31 PM
Subject: Re: delete to slow


> On Wed, Apr 06, 2005 at 13:45:13 -0300,
>   Ricardo Valença de Assis <valenca@xxxxxxxxxxxxxxxx> wrote:
> > Hello Everybody!
> >
> >     I´m trying to use delete to remove data from one table based on
another. The query is this:
> >
> >     DELETE FROM table1 WHERE column1 IN (SELECT column2 FROM table2);
> >
> >     but my table is big, so it takes a lot o time...
> >     Is there a way to use DELETE with INNER JOIN in PostGreSQL?
>
> Yes. You should be able to do something like:
> DELETE FROM table1 WHERE column1 = table2.column2;



[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux