Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- I'm also confused if the view is used or not:
- - I installed the NuGet package
- - the XML is generated
- I captured a ETW trace with WPR.exe before and after activating the view.
- In the callstacks, I see the same calls until EntityFramework.dll!System.Data.Entity.Core.Mapping.StorageMappingItemCollection+ViewDictionary::SerializedGetGeneratedViews.
- With the version which uses the views I see those lines:
- Line #, DPC/ISR, Process, Stack Tag, Stack , Count, TimeStamp, % Weight
- 45, , , , | | | | | | | | | | | | | | | | | | | | | | | | |- EntityFramework.dll!System.Data.Entity.Core.Mapping.StorageMappingItemCollection+ViewDictionary::SerializedCollectViewsFromCache, 358, , 0,08
- 46, , , , | | | | | | | | | | | | | | | | | | | | | | | | | |- EntityFramework.dll!System.Data.Entity.Infrastructure.MappingViews.DbMappingViewCacheFactory::Create, 353, , 0,07
- 47, , , , | | | | | | | | | | | | | | | | | | | | | | | | | | |- InteractivePreGeneratedViews.dll!InteractivePreGeneratedViews.ViewCacheFactoryBase::GenerateViews, 310, , 0,07
- 48, , , , | | | | | | | | | | | | | | | | | | | | | | | | | | | EntityFramework.dll!System.Data.Entity.Core.Mapping.StorageMappingItemCollection::GenerateViews, 310, , 0,07
- 49, , , , | | | | | | | | | | | | | | | | | | | | | | | | | | | |- EntityFramework.dll!System.Data.Entity.Core.Mapping.StorageMappingItemCollection::GenerateViews, 308, , 0,07
- After the last call I got this code:
- Line #, DPC/ISR, Process, Stack Tag, Stack , Count, TimeStamp, % Weight
- 50, , , , | | | | | | | | | | | | | | | | | | | | | | | | | | | | EntityFramework.dll!System.Data.Entity.Core.Mapping.ViewGeneration.ViewgenGatekeeper::GenerateViewsFromMapping, 308, , 0,07
- 51, , , , | | | | | | | | | | | | | | | | | | | | | | | | | | | | |- EntityFramework.dll!System.Data.Entity.Core.Mapping.ViewGeneration.ViewgenGatekeeper::GenerateViewsFromCells, 283, , 0,06
- 52, , , , | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |- EntityFramework.dll!System.Data.Entity.Core.Mapping.ViewGeneration.ViewGenerator::GenerateAllBidirectionalViews, 226, , 0,05
- 53, , , , | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |- EntityFramework.dll!System.Data.Entity.Core.Mapping.ViewGeneration.ViewGenerator::GenerateDirectionalViews, 172, , 0,04
- 54, , , , | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |- EntityFramework.dll!System.Data.Entity.Core.Mapping.ViewGeneration.ViewGenerator::GenerateDirectionalViewsForExtent, 155, , 0,03
- 55, , , , | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |- EntityFramework.dll!System.Data.Entity.Core.Mapping.ViewGeneration.ViewGenerator::GenerateViewsForExtentAndType, 125, , 0,03
- 56, , , , | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |- EntityFramework.dll!System.Data.Entity.Core.Mapping.ViewGeneration.QueryRewriting.QueryRewriter::GenerateViewComponents, 87, , 0,02
- 57, , , , | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |- EntityFramework.dll!System.Data.Entity.Core.Mapping.ViewGeneration.QueryRewriting.QueryRewriter::EnsureExtentIsFullyMapped, 42, , 0,01
- 58, , , , | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |- EntityFramework.dll!System.Data.Entity.Core.Mapping.ViewGeneration.QueryRewriting.QueryRewriter::RewriteQuery, 31, , 0,01
- 59, , , , | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |- EntityFramework.dll!System.Data.Entity.Core.Mapping.ViewGeneration.QueryRewriting.QueryRewriter::RewriteQueryCached, 23, , 0,00
- 60, , , , | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |- EntityFramework.dll!System.Data.Entity.Core.Mapping.ViewGeneration.QueryRewriting.RewritingProcessor`1[System.__Canon]::RewriteQuery, 18, , 0,00
- 61, , , , | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | EntityFramework.dll!System.Data.Entity.Core.Mapping.ViewGeneration.QueryRewriting.RewritingProcessor`1[System.__Canon]::RewriteQueryOnce, 18, , 0,00
- 62, , , , | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |- EntityFramework.dll!System.Data.Entity.Core.Mapping.ViewGeneration.QueryRewriting.RewritingPass`1[System.__Canon]::RewriteQuery, 15, , 0,00
- 63, , , , | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |- EntityFramework.dll!System.Data.Entity.Core.Mapping.ViewGeneration.QueryRewriting.RewritingPass`1[System.__Canon]::RewriteQuery, 13, , 0,00
- 64, , , , | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |- EntityFramework.dll!System.Data.Entity.Core.Mapping.ViewGeneration.QueryRewriting.RewritingSimplifier`1[System.__Canon]::TrySimplifyJoinRewriting, 6, , 0,00
- 65, , , , | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |- EntityFramework.dll!System.Data.Entity.Core.Mapping.ViewGeneration.QueryRewriting.RewritingSimplifier`1[System.__Canon]::SimplifyRewriting, 5, , 0,00
- 66, , , , | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |- EntityFramework.dll!System.Data.Entity.Core.Mapping.ViewGeneration.QueryRewriting.RewritingSimplifier`1[System.__Canon]::SimplifyRewritingOnce, 3, , 0,00
- and here for both cases the View is generated from the model/mappings:
- EntityFramework.dll!System.Data.Entity.Core.Mapping.ViewGeneration.ViewgenGatekeeper::GenerateViewsFromMapping
- So, I'm also confused if the cached views are used or not.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement