On Fri, 2004-10-29 at 19:01, Micah wrote:
> Just curious, but I'm wondering why you're joining to the messageblks
> table as it doesn't appear to have any bearing on the query?
> 
> Why not:
> 
> SELECT DISTINCT physmessage.id, physmessage.messagesize,
>  messages.seen_flag, physmessage.internal_date
> 
>  FROM dbmail_mailboxes mailboxes, dbmail_messages messages,
>  dbmail_physmessage physmessage
> 
>  WHERE mailboxes.owner_idnr='4' AND messages.status<'2'
> 
>  AND mailboxes.mailbox_idnr=messages.mailbox_idnr AND
>  messages.physmessage_id=physmessage.id
> 
>  ORDER BY physmessage.id DESC

Thanks, I did not see that. I was thinking I might be getting blind
on my own code.

It did cause a speedup, but not too big..  ~5-10% it seems.

> Not being familiar with the 2.0 schema yet, this might be a dumb comment,
> but as it's just a normal join, I don't think you're trying to verify that
> physmessage has a mate in messageblks.

I too am not familiar with the 2.0 schema yet.. And I do think that
some of the stuff that has changed since 1.0 were totally useless.
I'm going to get digging to see wether this is true or not.

I might also propose a whole new schema, but I do not expect it to
be used by others than me.

-=Dead2=-

Reply via email to