I want to compare the mailbox size from today to last week but my search is very slow and I am not sure how best to make it more efficient
index=msexchange source=exchangemailboxinventory samAccountName=testuser1
| eval mailboxSize = totalItemSize+totalDeletedItemSize
| eval MB = round(mailboxSize/1024)
| eval mailboxGB = round(MB/1024,2)
| eval archiveMailboxSize = archiveTotalItemSize+archiveTotalDeletedItemSize
| eval archiveMB = round(archiveMailboxSize/1024)
| eval archiveMailboxGB = round(archiveMB/1024,2)
| table samAccountName, totalItemSize, totalDeletedItemSize, mailboxGB, archiveTotalItemSize, archiveTotalDeletedItemSize, archiveMailboxGB
| dedup samAccountName
| join type=left samAccountName
[ search index=msexchange source=exchangemailboxinventory samAccountName=testuser1 latest=-1week
| eval mailboxSizeNew = totalItemSize+totalDeletedItemSize
| eval MBnew = round(mailboxSizeNew/1024)
| eval mailboxGBOld = round(MBnew/1024,2)
| table samAccountName, mailboxGBOld
| dedup samAccountName]
| eval mailboxGrowth = (mailboxGB - mailboxGBOld) , growth= (mailboxGrowth/mailboxGBOld)*100
| table samAccountName, totalItemSize, totalDeletedItemSize, mailboxGB,mailboxGBOld, mailboxGrowth, growth
| sort -mailboxGB
... View more