[Info-vax] VMS MAIL: order of DELETE

Jan-Erik Söderholm jan-erik.soderholm at telia.com
Mon Oct 21 09:09:51 EDT 2019


Den 2019-10-21 kl. 15:02, skrev Simon Clubley:
> On 2019-10-21, Craig A. Berry <craigberry at nospam.mac.com> wrote:
>> On 10/20/19 5:50 PM, Simon Clubley wrote:
>>> On 2019-10-20, Volker Halle <volker_halle at hotmail.com> wrote:
>>>> Phillip,
>>>>
>>>> routine mail$cmd_delete in module [MAILSHR] has:
>>>>
>>>>        INCR i FROM 1 TO .mail$gl_message_count
>>>>
>>>> where mail$gl_message_count is 'Number of messages selected'
>>>>
>>>> So if specifying MAIL> DELETE/ALL all the selected mails seem to be
>>>> deleted in ascending message number order.
>>>>
>>>
>>> Wouldn't it be more efficient to delete the files in reverse order ?
>>>
>>> That way, if you are deleting a large number of messages at once,
>>> you don't end up having to shuffle down directory blocks which are
>>> going to be deleted anyway.
>>
>> As far as I can remember, deleting mail messages may or may not involve
>> deleting files, depending on the size of the message.  And even if the
>> order in the file system has anything to do with the order in which
>> messages are received (I don't remember how the files get named),
>> deleting most recent messages first might actually do what you are
>> suggesting, depending on what the naming convention is.
>>
> 
> The filename includes the VMS style binary timestamp.
> 
> When I looked at a sample of mailbox entries before writing the above,
> they were all in ascending date order in the directory. However, I've
> now seen others which are not in ascending date order (based on the
> output from dir/date).
> 
> I'll modify my suggestion to say that if they were sorted in filename
> order and deleted in reverse, then that would still appear to be more
> efficient because you are trading off a small amount of sort time versus
> the time taken to shuffle down the directory entries.
> 
> Simon.
> 

But still, *if* they are large enough to be stored as separate files,
not directly in the MAIL.MAI file.

Also, say you do a SELECT and get a list 1-10 on the screen. Those
numbers are only relevant for that specific SELECT. If you do another
SELECT you can get some of the same mails but with other numbers.
Is there a known order of the returned SELECT result?

I'd say this is a non issue with todays systems and storage. And I
do not belive that the volume of anyones daily mails are on VMS.





More information about the Info-vax mailing list