🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.interbase.opensource
Article #345

Really Slow Delete on an System

#345
From: Jarek Bialik
Date: Fri, 05 Nov 2004 23:56
31 lines
1941 bytes
Hi all
 I implemented a client solution running om IB 6 opensource, this was years
 ago and the database / table structure is defintely not optimized. In terms 
of
 indices and referential constraints and cascading deletes, I know all of 
this
 stuff now but like I said this was years ago. Anyways I have a query of the 
form
Delete From PaymentsWip Where WipNo in

(select WipNo From InternalInvmaster Where (Cast(inqDate as Date) <= 
'12/31/2001'))

 and its really slow, and I need to have about 10 of these run on separate 
tables,
 I tried to backup and restore and sweep and then ran the query, but that 
only shaved off
 4min on a 20 min query,

the question , should I create an Index on the inqDate fields, and is the 
"in" operator
in the SQL the issue, can I re-wite the query? Also I was running this right 
from the IBConsole.

any suggestions would really be helpful as I need to dump a bunch of data 
monday morning
at the client site?

Thanks All
Jarek Bialik
Britec Software
Technical Details
Message-ID: <418c133c$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!news.glorb.com!news-in.ntli.net!newsrout1-win.ntli.net!ntli.net!newsfeed.wirehub.nl!194.72.7.126.MISMATCH!news-peer-test!btnet!newsfeed.bt.es!caladan.landsraad.net!newsgroups.borland.com!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Thread: 106772,edefe87e3c53cf5d,start
X-Google-Attributes: gid106772,public
X-Google-Language: ENGLISH,ASCII-7-bit
From: "Jarek Bialik" <jbialik@telusplanet.net>
Newsgroups: borland.public.interbase.opensource
Subject: Really Slow Delete on an System
Date: Fri, 5 Nov 2004 16:56:45 -0700
Lines: 33
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
X-RFC2646: Format=Flowed; Original
NNTP-Posting-Host: 69.36.97.40
Message-ID: <418c133c$1@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1099699004 69.36.97.40 (5 Nov 2004 15:56:44 -0700)
Path: arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!news.glorb.com!news-in.ntli.net!newsrout1-win.ntli.net!ntli.net!newsfeed.wirehub.nl!194.72.7.126.MISMATCH!news-peer-test!btnet!newsfeed.bt.es!caladan.landsraad.net!newsgroups.borland.com!not-for-mail