SQL Server Query Tuning Series - Is Execution Plan Retrieved from Cache? #jbswiki #querytuning

SQL Server Query Tuning Series - Is Execution Plan Retrieved from Cache? #jbswiki #querytuning

JBSWiki

54 года назад

79 Просмотров

SQL Server Query Tuning Series - Is Execution Plan Retrieved from Cache? #jbswiki #querytuning

Restoring Required Databases for Query Tuning Session - https://www.youtube.com/watch?v=LK_Lau0-BmU

drop table Table7
create table Table7(
Col1 int primary key identity(1,1),
Col2 int,
Col3 int)

insert into Table7 values (1,2)
insert into Table7 values (2,2)
insert into Table7 values (3,2)
insert into Table7 values (4,2)
insert into Table7 values (5,1)
insert into Table7 values (6,1)

select col2 from Table7 where Col3=2

sp_recompile 'Table7'

select col2 from Table7 where Col3=2

select col2 from Table7 where Col3=2 option (recompile)

drop table Table7

Disclaimer:
The views expressed on this Video are mine alone and do not reflect the views of my company or anyone else. All postings on this Video are provided “AS IS” with no warranties, and confers no rights.

Тэги:

##sqlserver_#alwayson #sql_server #sqlserver #querytuning #query_tuning #plan_cache #retrieved_from_cache #retrievedfromcache #recompile #SQL_Server_Query_Tuning_Series #Is_Execution_Plan_Retrieved_from_Cache #SQL_Server #Query_Tuning #Execution_Plan #Cache #Plan_Cache #Query_Performance #Query_Optimization #Database_Performance #SQL_Server_Performance #SQL_Server_Optimization #sql_server_interview_questions_and_answers_for_experienced #sql_server_query_optimization
Ссылки и html тэги не поддерживаются


Комментарии: