on sql server 2014, fast, on sql server 2012, slow.
bug?
you can reproduce running code below
create table dbo.test (aaa [int] identity(1,1), bbb int) go create view dbo.vtest select t.aaa, t.bbb dbo.test t go create view dbo.vvtest select t1.aaa, t1.bbb dbo.vtest t1 go exec sp_help 'vvtest' -- super slow go drop view dbo.vvtest go drop view dbo.vtest go drop table dbo.test go
reproduced. 100% use of core following call stack
ntoskrnl.exe!kiswapcontext+0x7a ntoskrnl.exe!kicommitthreadwait+0x1d2 ntoskrnl.exe!kewaitforsingleobject+0x19f ntoskrnl.exe!kisuspendthread+0x54 ntoskrnl.exe!kideliverapc+0x201 ntoskrnl.exe!kiapcinterrupt+0xd7 sqllang.dll!tcachestore<cacheclockalgorithm>::getnextuserdatainhashbucket+0x102 sqllang.dll!ccache::fprocessentry+0xdf sqllang.dll!ccache::fremove+0x115 sqllang.dll!ccache::removebyobjid+0x1d sqlmin.dll!getbaserelation+0xb1 sqlmin.dll!copyoutidentitypartintovariant+0x53 sqlmin.dll!nmidtseedwstr+0x1bc sqltses.dll!cesexec::generaleval+0x1a9 sqllang.dll!cxstmtassignbase::xretexecute+0x149 sqllang.dll!cxstmtselectwithoutquery::xretexecute+0x136 sqllang.dll!cmsqlexeccontext::executestmts<1,1>+0x400 sqllang.dll!cmsqlexeccontext::fexecute+0xa33 sqllang.dll!csqlsource::execute+0x866 sqllang.dll!cstmtexecproc::xretlocalexec+0x201 sqllang.dll!cstmtexecproc::xretexecexecute+0x4d5 sqllang.dll!cxstmtexecproc::xretexecute+0x38 sqllang.dll!cmsqlexeccontext::executestmts<1,1>+0x400 sqllang.dll!cmsqlexeccontext::fexecute+0xa33 sqllang.dll!csqlsource::execute+0x866 sqllang.dll!process_request+0x73c sqllang.dll!process_commands+0x51c sqldk.dll!sos_task::param::execute+0x21e sqldk.dll!sos_scheduler::runtask+0xa8 sqldk.dll!sos_scheduler::processtasks+0x29a sqldk.dll!schedulermanager::workerentrypoint+0x261 sqldk.dll!systemthread::runworker+0x8f sqldk.dll!systemthreaddispatcher::processworker+0x372 sqldk.dll!schedulermanager::threadentrypoint+0x236 kernel32.dll!basethreadinitthunk+0xd ntdll.dll!rtluserthreadstart+0x1d
so looks same bug the 1 reported here