• @gary, on sql profiler, I see that query executed 4500 times when I open the treeview:

    use [(all db from A to Z)]

    SELECT

    ISNULL((select top 1 1 from sys.filegroups FG where FG.[type] = 'FX'), 0) AS [HasMemoryOptimizedObjects]

    Every line takes between 50 and 75 ms to execute, reads between 150 and 250 rows, and that call is from a loop that takes more time to execute, because I see an average of 100-125ms between each query.

    So, it can take 100*4500 ms to open my treeview.

    There is officially something wrong with that process, as I can open any other version of SQL in 2 seconds.

    These are 3 SQL profiler lines:

    SQL:BatchCompleteduse [champiXXXX]

    SELECT

    ISNULL((select top 1 1 from sys.filegroups FG where FG.[type] = 'FX'), 0) AS [HasMemoryOptimizedObjects]Microsoft SQL Server Management Studiocpu:32read:229write:0duration:57starts:2015-03-05 13:46:27.757end:2015-03-05 13:46:27.813

    SQL:BatchCompleteduse [changeXXXX]

    SELECT

    ISNULL((select top 1 1 from sys.filegroups FG where FG.[type] = 'FX'), 0) AS [HasMemoryOptimizedObjects]Microsoft SQL Server Management Studiocpu:15read:167write:0duration:42starts:2015-03-05 13:46:27.863end:2015-03-05 13:46:27.907

    SQL:BatchCompleteduse [chaXXXX]

    SELECT

    ISNULL((select top 1 1 from sys.filegroups FG where FG.[type] = 'FX'), 0) AS [HasMemoryOptimizedObjects]Microsoft SQL Server Management Studiocpu:16read:2410duration:63starts:2015-03-05 13:46:27.953end:2015-03-05 13:46:28.017