You are viewing limited content. For full access, please sign in.

Question

Question

Slow Loading of Folders After SQL Compatibility Level Change

asked on June 16, 2022 Show version history

We are preparing to do an upgrade from Laserfiche 10 to 11 and have been updating the compatibility levels of our repository databases from 2008 R2 (100) to version 2016 (130). When we did this, users started noticing that the loading of folders decreased significantly. As part of troubleshooting the issue I did the normal tasks of what columns are showing and tested removing columns. While decreasing the number of columns that are showing does improve the speed, the column profiles that were being used prior to the change were working without issue. Does anyone have any ideas of what might be causing the issue or if there might be a fix for it in a future version of the Laserfiche Server or Client? The slowness is present in both the Windows and Web Clients.

We are using Laserfiche Server 10.4.2.376 and Web Client 10.4.2.347.

UPDATE: I found this Microsoft document that describes performance degradation when moving from compatibility level 120 to 130. Would this affect the query used to pull the results of a folder? Upgrade compatibility level degrades performance - SQL Server | Microsoft Docs

2 0

Answer

SELECTED ANSWER
replied on November 29, 2023

Jacob, we have left our compatibility level at 130 (SQL Server 2016) and have turned on Legacy Cardinality Estimation. The issue is not related to Laserfiche, but how the estimation of cardinality is done in newer versions of SQL Server. Our DBAs have said that there is no real drawback from leaving Legacy Cardinality Estimation turned on and since you can do it at a database level it doesn't affect our other databases.

1 0

Replies

replied on June 16, 2022

Please note that this client has engaged their Service Provider on this issue. Laserfiche, let us know if a case is needed to proceed. 

0 0
replied on June 30, 2022 Show version history

As a test, we dropped the compatibility level back down to 100 and everything sped back up. We then changed it to 120, which performed faster than 130, but slower than 100. For now we have put it back at 100.

0 0
replied on August 21, 2022

We have supplied a SQL Profiler trace file and dump file to support. For our own testing we enabled LCE for the repository database and that seems to have fixed the slowness issues, but we do not want to use LCE if it is not necessary.

0 0
replied on August 22, 2022

That particular notice is not relevant to folder listings. The STIntersects function that it talks about is only relevant when doing geography searches. But it's not uncommon for systems to see performance problems when upgrading compatibility levels. If you haven't rebuilt indexes, that's always a good thing to try. Beyond that, Microsoft has a Query Tuning Assistant that can help https://docs.microsoft.com/en-us/sql/relational-databases/performance/upgrade-dbcompat-using-qta?view=sql-server-ver15 .

0 0
replied on August 25, 2022

Blake, for what it's worth we upgraded from SQL 2014 to 2019 a couple of weeks ago, upgrading the compatibility to 2019 as well (150) and haven't had any issues. We have both LF 11 and LF 10.4.5 environments.

Interestingly, my custom lookups databases that connect to external systems had to be set back to 2014 compatibility, but none of the Laserfiche-created DBs are giving us problems.

0 0
replied on August 25, 2022

Thanks for the information Pieter. We're waiting to hear back from support to see if they found anything that we may use. It's very strange that we are seeing it in both our test and production systems. Both are running the same version of SQL Server and LF Server.

0 0
replied on November 29, 2023

Hey Blake,

Did you end up finding anything out about this? I've inherited a client from a different service provider who states that after moving their databases from SQL Express to SQL Standard, they have to run their LF databases in 2008 (100) compatibility mode or it's just so slow that it becomes unusable. I know it's unlikely we're looking at the exact same situation, but curious about where we can start troubleshooting. I'll open a case with Support once we get their LSAP situation figured out, so figured I'd start here on Answers.

Thanks!

0 0
SELECTED ANSWER
replied on November 29, 2023

Jacob, we have left our compatibility level at 130 (SQL Server 2016) and have turned on Legacy Cardinality Estimation. The issue is not related to Laserfiche, but how the estimation of cardinality is done in newer versions of SQL Server. Our DBAs have said that there is no real drawback from leaving Legacy Cardinality Estimation turned on and since you can do it at a database level it doesn't affect our other databases.

1 0
replied on November 29, 2023

Thanks! We'll start there.

0 0
You are not allowed to follow up in this post.

Sign in to reply to this post.