Hi,
as we have troubles with the search performance in RDM 2020.2.19 i would like to cleanup logs and history in our datasource (MS SQL).
But it seems that there are so many entries in the database that always when i try to run one of the cleanups the operation runs into a timeout.
Is it possible to run the cleanup directly on the sql server via sql query? (i assume thats what the option in the gui does)
If yes please let me know the commands.
Thanks a lot
Here it is, like with any script make sure you have proper backups. Execute at your own risk this has not been tested.
You might want to start with a small increments, if you try to clean up 2 years worth of logs in one update it will take forever. Go with a few months at a time and see how the database behaves.
RUN AT YOUR OWN RISK
DECLARE @DELETE_BEFORE_DATE DATETIME;
-- Set the "As Of" date for the cleanup
SET @DELETE_BEFORE_DATE = '2018-12-31';
-- Clean Up Deleted History
DELETE ch
FROM dbo.ConnectionHistory ch
INNER JOIN dbo.ConnectionHistory chD ON ch.ConnectionID = chD.ConnectionID
WHERE chD.HistoryType = 'D' AND chD.ModifiedDate < @DELETE_BEFORE_DATE;
-- Clean Up Entry history
DELETE FROM dbo.ConnectionHistory WHERE HistoryType != 'D' AND ModifiedDate < @DELETE_BEFORE_DATE;
-- Clean Up Activity Logs
-- (All Vaults + Administration Logs)
DELETE FROM dbo.ConnectionLog WHERE (CreationDate <= @DELETE_BEFORE_DATE);
-- Reste client cache ID
UPDATE dbo.DatabaseInfo SET ConnectionCacheID = NEWID();Stéfane Lavergne
Thanks a lot, i will try that.
any other suggestions if the search is still slow after cleaning up the database?
The Problem mostly occurs if you mistype your search term or you are using longer search terms.
Which search is slow, search bar at the bottom or advanced search?
How many sessions do you have?
How slow is it? Is it like 2-3 seconds slow or 10-20 second slow?
Best regards,
Stéfane Lavergne
The searchbar at the bottom, we have about 3900 entries.
It's about 5 seconds.
I will investigate, this search is done in memory and not the DB so would explain why cleaning up the database didn't help.
What search options are checked?
Please check each of the sub-menus. The goal is to be setup exactly as you are so I can reproduce the issue then fix it.
Best regards,
Stéfane Lavergne
Hi, here is the setup.
I'm not able to reproduce the issue here exactly as you have it but I have an idea.
The issue looks to be after the filter on the selection change
Could it be that it is slow when you select the root node (aka dashboard)? Can you please try, without filtering, selecting a few different sessions and the dashboard/root a few times and send me the trace?
If it's the dashboard the issue, we then need to figure out why? We time the "SelectionChange" but not granular enough to identify the issue. Maybe send me a scree shot of the dashboard (please blur out any sensitive information). Please send it via Private Message instead of posting it here (click on my profile, envelope icon top-right).
Best regards,
Stéfane Lavergne
I've sent you the requested information via Private Message.
As you mentioned maybe it's somehow related to the dashboard, the issue arised after updating RDM to 2020.2.19 from an older version (14.xx).
And as i remember the dashboard did not exist back then (at least not with the features it has now)
Thank you, I will investigate and get back to you.
In the meantime, can you please try with the latest v2020.2.20, it has some performance improvements that are in theory not related to your issue gut is worth giving it a try.
https://remotedesktopmanager.com/home/downloadenterprise
Best regards,
Stéfane Lavergne
I think we've got it, I put 10,000 expired entries (you have 800'ish) into my vault, now I can't even start the app (oops!). I might have pushed too far this time but at least I can reproduce it now and hence fix it.
I will keep you posted once I found/fixed it.
Best regards,
Stéfane Lavergne
Hi, i've already tested the new v2020.2.20 but as you already supposed no changes - issue is still there .
I'm glad that it seems you are getting closer to the cause of the issue. Looking forward to the fix.
I'm done, at least I hope. I resolved the performance issue with the dashboard overview.
I also added a system option to disable the vault dashboard overview, just in cased it still slow.
The option will be in File > Options > User Interface > Dashboard > "Disable vault dashboard overview"
All this will be available in the next beta release (v2020.3.7). You can check here https://remotedesktopmanager.com/home/downloadenterprise#Beta
Best regards,
Stéfane Lavergne
Ok great! can you tell me what was the issue?
any ETA for the next release version with the fix ?
The underlying issue was the size of the HTML file generated to create the dashboard overview. In my case with 10,000 expired entries the file was over 25 MB, not a real-world test but it allowed me to debug the issue. That is where the things got weird, you see we use an embedded web control (IE) for the dashboard overview. We tell it to load the 25 MB but it's so big it would just hang while it parses the file, but then the refresh timer would fire and we would start over. The simple solution was to limit the expired/expiring entries to 50 (see image).
As for availability, we are aiming for a new release in about 2 weeks, with a few beta releases until then.
Best regards,
Stéfane Lavergne