Re: Which delete statement is faster?



In article <13h9vel51sekc1b@xxxxxxxxxxxxxxxxxx>, "Mike Minor" <mminorhsd@xxxxxxxxxxxxx> writes:
Is there any difference in the speed at which the command is executed in the
following examples?

del a*.*;*
del a*.txt;*
del a*.txt;1

All things being equal (i.e. the only files in the directory that
match the a*.*;* wildcard also match a*.txt;1), I'd expect no significant
performance difference.

The real work is going to be the disk I/O writing directory contents
back to disk. Reading directory entries into cache and parsing
and searching directory entries from cache is unlikely to be the
bottleneck.

Why do you ask?

Historically, the thing that absolutely kills delete performance is
the "bubble down" that can take place if you delete the last directory
entry in a block near the front end of a _HUGE_ .DIR file.

Various tweaks over the years have improved this behavior by orders
of magnitude. If it's still an issue for you, a reverse-alphabetical-order
delete is one thing that can sometimes be of use.
.



Relevant Pages