From: Joachim Duerr (ADS) on
John Martens wrote:

>Why reindex ?
>I assume that ADS updates the index when a record is deleted ?

depends on the index expression/condition: if there's no DELETED() in
any of those, there's no reason to create a new index kex.

--
Joachim Duerr
Advantage Presales
check out my new ADS book on http://www.jd-engineering.de/adsbuch
From: Geoff Schaller on
Move to SQL <g>.


"Martin" <spam(a)spam.spam> wrote in message
news:1zX9n.262479$FH.149151(a)newsfe03.ams2:

> I need to trim a file a lot as quickly as possible of certain records.
>
> File is roughly 6GB
>
> Production build is 2.7, Server is ADS 7.1, going to 9 next week.
>
> Testing with 2.8 and ADS 8.1, 4% on my PC and 15% on the "server".
>
> This is the current code and does about 750 records a second for delete.
>
> SELF:dbBarList:SetOrder(3)
> SELF:dbBarList:Seek('19900101',TRUE)
> SELF:dbBarList:Delete(,{||_FIELD->PL_PDate <= dClear})
> SELF:dbBarList:Pack()
>
> Can anyone think of a way of speeding this up? (Not including my favourite
> of using a different NOS)
>
> What is the RDD doing via ADS?
>
> Thanks
>
> Martin

From: oscar hernandez on
use ADT instead of DBF, it will reuse the deleted record
automatically, You do not need to pack.


On Feb 2, 3:15 pm, "Geoff Schaller"
<geo...(a)softxwareobjectives.com.au> wrote:
> Move to SQL <g>.
>
> "Martin" <s...(a)spam.spam> wrote in message
>
> news:1zX9n.262479$FH.149151(a)newsfe03.ams2:
>
>
>
> > I need to trim a file a lot as quickly as possible of certain records.
>
> > File is roughly 6GB
>
> > Production build is 2.7, Server is ADS 7.1, going to 9 next week.
>
> > Testing with 2.8 and ADS 8.1, 4% on my PC and 15% on the "server".
>
> > This is the current code and does about 750 records a second for delete..
>
> > SELF:dbBarList:SetOrder(3)
> > SELF:dbBarList:Seek('19900101',TRUE)
> > SELF:dbBarList:Delete(,{||_FIELD->PL_PDate <= dClear})
> > SELF:dbBarList:Pack()
>
> > Can anyone think of a way of speeding this up? (Not including my favourite
> > of using a different NOS)
>
> > What is the RDD doing via ADS?
>
> > Thanks
>
> > Martin- Hide quoted text -
>
> - Show quoted text -

From: richard.townsendrose on
Martin

ADT is the best way without a doubt ...

Otherwise pack [and i think killing the index first is a good idea]
and reindex using ADS

Geoff will just tell you sql ... end of story

Richard
From: Mathias on
Hi Martin,

I would say that you would be better of with your own while loop. The
delete command with the for clause processes all records even though
you have positioned the server on the first matching your condition.

I suppose that order 3 orders the records in "PL_PDate"-order.
Test if this is faster...

SELF:dbBarList:SetOrder(3)
SELF:dbBarList:GoTop()
while (SELF:dbBarList:PL_PDate <= dClear) .and. !SELF:dbBarList:EOF
SELF:dbBarList:Delete()
SELF:dbBarList:Skip()
enddo

SELF:dbBarList:Pack()

If this operation still takes a lot of time test Davids method or show
a progress bar and tell the user how many records that have been
deleted, but only update the progress bar and the record count for
every 100th record or so that this does not take too much processing
time.

You could also be more radical: Copy the the file to a local temp-
folder, do the processing and write it back to the original location.

Mathias

On 2 Feb, 16:31, "Martin" <s...(a)spam.spam> wrote:
> I need to trim a file a lot as quickly as possible of certain records.
>
> File is roughly 6GB
>
> Production build is 2.7, Server is ADS 7.1, going to 9 next week.
>
> Testing with 2.8 and ADS 8.1, 4% on my PC and 15% on the "server".
>
> This is the current code and does about 750 records a second for delete.
>
> SELF:dbBarList:SetOrder(3)
> SELF:dbBarList:Seek('19900101',TRUE)
> SELF:dbBarList:Delete(,{||_FIELD->PL_PDate <= dClear})
> SELF:dbBarList:Pack()
>
> Can anyone think of a way of speeding this up? (Not including my favourite
> of using a different NOS)
>
> What is the RDD doing via ADS?
>
> Thanks
>
> Martin