Re: [SQL] need some help with a delete statement

2003-07-03 Thread scott.marlowe
On Wed, 2 Jul 2003, Matthew Hixson wrote: > Thanks for all your help, Scott. A friend of mine whipped out this > script which runs a lot faster than trying to use the original query I > posted. >-M@ > > begin; > create temporary table cart_temp as select distinct a.cart_id, > a.cart_cookie

Re: [SQL] need some help with a delete statement

2003-07-02 Thread Matthew Hixson
Thanks for all your help, Scott. A friend of mine whipped out this script which runs a lot faster than trying to use the original query I posted. -M@ begin; create temporary table cart_temp as select distinct a.cart_id, a.cart_cookie from v_carts a, v_cart_contents b where a.cart_id = b.cart

Re: [SQL] need some help with a delete statement

2003-07-01 Thread scott.marlowe
On Tue, 1 Jul 2003, Matthew Hixson wrote: > > On Tuesday, July 1, 2003, at 05:47 AM, scott.marlowe wrote: > >>> > >>> what does the output of psql say if you have the /timing switch on? > >> > >> # select cart_id from carts except (select distinct cart_id from > >> cart_contents) limit 1; > >>

Re: [SQL] need some help with a delete statement

2003-07-01 Thread Matthew Hixson
On Tuesday, July 1, 2003, at 05:47 AM, scott.marlowe wrote: what does the output of psql say if you have the /timing switch on? # select cart_id from carts except (select distinct cart_id from cart_contents) limit 1; cart_id - 2701 (1 row) Time: 10864.89 ms # explain analyze delete f

Re: [SQL] need some help with a delete statement

2003-07-01 Thread scott.marlowe
On Tue, 1 Jul 2003, Matthew Hixson wrote: > > On Monday, June 30, 2003, at 12:00 PM, scott.marlowe wrote: > > > On Mon, 30 Jun 2003, Matthew Hixson wrote: > > > >> On Monday, June 30, 2003, at 05:06 AM, scott.marlowe wrote: > >> > >>> On Fri, 27 Jun 2003, Matthew Hixson wrote: > >>> > Hi, I

Re: [SQL] need some help with a delete statement

2003-07-01 Thread Matthew Hixson
On Monday, June 30, 2003, at 12:00 PM, scott.marlowe wrote: On Mon, 30 Jun 2003, Matthew Hixson wrote: On Monday, June 30, 2003, at 05:06 AM, scott.marlowe wrote: On Fri, 27 Jun 2003, Matthew Hixson wrote: Hi, I have a bunch of records that I need to delete from our database. These records re

Re: [SQL] need some help with a delete statement

2003-06-30 Thread scott.marlowe
On Mon, 30 Jun 2003, Matthew Hixson wrote: > On Monday, June 30, 2003, at 05:06 AM, scott.marlowe wrote: > > > On Fri, 27 Jun 2003, Matthew Hixson wrote: > > > >> Hi, I have a bunch of records that I need to delete from our database. > >> These records represent shopping carts for visitors to our

Re: [SQL] need some help with a delete statement

2003-06-30 Thread Matthew Hixson
On Monday, June 30, 2003, at 05:06 AM, scott.marlowe wrote: On Fri, 27 Jun 2003, Matthew Hixson wrote: Hi, I have a bunch of records that I need to delete from our database. These records represent shopping carts for visitors to our website. The shopping carts I'd like to delete are the ones with

Re: [SQL] need some help with a delete statement

2003-06-30 Thread scott.marlowe
On Fri, 27 Jun 2003, Matthew Hixson wrote: > Hi, I have a bunch of records that I need to delete from our database. > These records represent shopping carts for visitors to our website. > The shopping carts I'd like to delete are the ones without anything in > them. Here is the schema: > >

Re: [SQL] need some help with a delete statement

2003-06-27 Thread Bruno Wolff III
On Fri, Jun 27, 2003 at 16:09:31 -0700, Matthew Hixson <[EMAIL PROTECTED]> wrote: > Hi, I have a bunch of records that I need to delete from our database. > These records represent shopping carts for visitors to our website. > The shopping carts I'd like to delete are the ones without anythin

[SQL] need some help with a delete statement

2003-06-27 Thread Matthew Hixson
Hi, I have a bunch of records that I need to delete from our database. These records represent shopping carts for visitors to our website. The shopping carts I'd like to delete are the ones without anything in them. Here is the schema: create sequence carts_sequence; create table carts( cart