Тёмный

SQL Server Performance issues || SQL Server Long Running Query || SQL Server Query Running Slow 

Tech and Art
Подписаться 7 тыс.
Просмотров 22 тыс.
50% 1

SQL Server Performance issues || SQL Server Long Running Query || SQL Server Query Running Slow
Query:-
SELECT s.session_id
,r.STATUS
,r.blocking_session_id 'blocked by'
,r.wait_type
,wait_resource
,r.wait_time / (1000.0) 'Wait Time (in Sec)'
,r.cpu_time
,r.logical_reads
,r.reads
,r.writes
,r.total_elapsed_time / (1000.0) 'Elapsed Time (in Sec)'
,Substring(st.TEXT, (r.statement_start_offset / 2) + 1, (
(
CASE r.statement_end_offset
WHEN - 1
THEN Datalength(st.TEXT)
ELSE r.statement_end_offset
END - r.statement_start_offset
) / 2
) + 1) AS statement_text
,Coalesce(Quotename(Db_name(st.dbid)) + N'.' + Quotename(Object_schema_name(st.objectid, st.dbid)) + N'.' +
Quotename(Object_name(st.objectid, st.dbid)), '') AS command_text
,r.command
,s.login_name
,s.host_name
,s.program_name
,s.host_process_id
,s.last_request_end_time
,s.login_time
,r.open_transaction_count
FROM sys.dm_exec_sessions AS s
INNER JOIN sys.dm_exec_requests AS r ON r.session_id = s.session_id
CROSS APPLY sys.dm_exec_sql_text(r.sql_handle) AS st
WHERE r.session_id != @@SPID
ORDER BY r.cpu_time DESC
,r.STATUS
,r.blocking_session_id
,s.session_id
*****************************************
SQL, SQL DATABASE, SQL BACKUP, RESTORE, RECOVERY, USERS, LOGINS, AGENT, SQL JOBS, SQL ARCHITECTURE, SQL INSTANCE, SQL UPGRADE, SQL PATCHING, SQL PERFORMANCE, SQL MANITINEMANC, SQL SLOWNESS, SQL HARDWARE, SQL LIFE CYCLE, SQL DR, SQL MIRRORING, SQL REPLICATION SQL ALWAYS ON, SQL LOGSHIPING, SQL CLUSTERING, SQL INSTALLATION, SQL MIGRATION, SQL TO AZURE,CLOUDE,AZURE,AMAZON,GOOGLE, SQL TO AWS,AWS,SQL MIGRATION TO CLOUDE,AZURE FUNDAMENTAL, AZURE CERTIFICATION, AZURE ARCHITECTURE, SQL ON LINUX, SQL LINIX INSTALLATION, SQL PERFORMANCE QUERY, SQL BLOCKING,SQL DEADLOCK,SQL DATABASE CRASHED, SQL DATABASE DOWN,SQL SERVICES , SQL SERVICES STOP, SQL INSTALLATION FAILED, SQL UPGRADE FAILED,
#sqlserver #sqlserverdba #techandart

Опубликовано:

 

28 янв 2022

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 19   
@ithisrinu9593
@ithisrinu9593 9 месяцев назад
super helpfull thank you sir
@balakannan9368
@balakannan9368 Год назад
I have sp which is created before 2 years it runs smooth but suddenly I took so much time to excexute please help me solve this issues
@prakashbisen612
@prakashbisen612 2 года назад
Thank you very much sir..
@TechandArt
@TechandArt 2 года назад
Thanks mate plz visit playlists of channel also share wd othrrs
@gaurav6471
@gaurav6471 Год назад
I have asked questions for performance issues ?? Thanks for help
@avdheshrajpoot1422
@avdheshrajpoot1422 Год назад
Unable to copy script from description. Can you share the link? Thanks!
@moneybucket6930
@moneybucket6930 Год назад
Hello sir …after app team reboot the sql services we are facing indexing job running in non business hours ..I stop indexing job one day …but it is running very long time in next day also …what is the troubleshooting solution for this …kindly help me to relief this problem
@TechandArt
@TechandArt Год назад
Stopping the job not only will help... You need to kill the particular job sessions Id
@subbu354
@subbu354 2 года назад
Hi sir thanks for knowledge sharing, I have a doubt if server and database down what I'll we do
@TechandArt
@TechandArt 2 года назад
Then you need to restart services and also need to to figure out in logs why it went down.
@subbu354
@subbu354 2 года назад
@@TechandArt thanks sir
@pikachu3686
@pikachu3686 24 дня назад
that kukdoo koo behind
@TechandArt
@TechandArt 24 дня назад
Plz ignore 😂
@arulmv697
@arulmv697 8 месяцев назад
Talking talking talking.. main content is 30 sec only
@brijkishore7030
@brijkishore7030 Год назад
can you give me script.
@sanjanasara252
@sanjanasara252 2 года назад
Sir we have SQL query it's taking 2 hrs to complete can u give any solution for that
@TechandArt
@TechandArt 2 года назад
Check the query explanation plan .... Check if any parallel query /jobs running at the same time Check if any blocking occurring at the same time .. Check ur statistics ..it should be updated Tune the query
@sanjanasara252
@sanjanasara252 2 года назад
@@TechandArt Thank you so much sir for your response.DB2 IBM data studio -how to check query plan sir??
@amnaamir6894
@amnaamir6894 Год назад
@@TechandArt How to Check if any parallel query /jobs running at the same time ???
Далее
Why You Need Query Store
57:20
Просмотров 10 тыс.
How to See Where Your Oracle SQL Query is Slow
12:08
Просмотров 3,6 тыс.
What is Parameter Sniffing in SQL Server?
18:02
Просмотров 4,2 тыс.