Comments
6 comments
-
Its hard to work out quite what you're wanting to see here Torsten. I get
You're saying this is not what you want? -
Hi Russell
Thanks for looking into this!
The issue is that the statement after the GO is shift one tab to the right.
If you format the batches one by one you will see that the tab is gone correctly
This behaviour leads to a formatted code which will be shifted to the right after each GO (or for other reasons)
In the end your entire code is completely out of alignment -
Here we go-- Start the session io_reads
IF NOT EXISTS
(
SELECT *
FROM
sys.dm_xe_sessions
WHERE
name = N'io_reads'
)
ALTER EVENT SESSION io_reads
ON SERVER STATE = START;
GO
-- Start the session io_reads
IF NOT EXISTS
(
SELECT *
FROM
sys.dm_xe_sessions
WHERE
name = N'io_reads'
)
ALTER EVENT SESSION io_reads
ON SERVER STATE = START;
GO
-- Start the session io_reads
IF NOT EXISTS
(
SELECT *
FROM
sys.dm_xe_sessions
WHERE
name = N'io_reads'
)
ALTER EVENT SESSION io_reads
ON SERVER STATE = START;
GO
-- Start the session io_reads
IF NOT EXISTS
(
SELECT *
FROM
sys.dm_xe_sessions
WHERE
name = N'io_reads'
)
ALTER EVENT SESSION io_reads
ON SERVER STATE = START;
GO
-- Start the session io_reads
IF NOT EXISTS
(
SELECT *
FROM
sys.dm_xe_sessions
WHERE
name = N'io_reads'
)
ALTER EVENT SESSION io_reads
ON SERVER STATE = START;
GO
-- Start the session io_reads
IF NOT EXISTS
(
SELECT *
FROM
sys.dm_xe_sessions
WHERE
name = N'io_reads'
)
ALTER EVENT SESSION io_reads
ON SERVER STATE = START;
GO
-
Yes, that is odd. I'll dig into it.
-
We've logged this as SP-7398 Torsten. I'll update you when I have more information.
-
Hi Torsten, this has finally been fixed - if you haven't already updated to the latest version please do so.
Add comment
Please sign in to leave a comment.
IF NOT EXISTS
(
SELECT *
FROM
sys.dm_xe_sessions
WHERE
name = N'io_reads'
)
ALTER EVENT SESSION io_reads
ON SERVER STATE = START;
GO
-- Watch event session
-- Execute with a non selective value : 0
-- Actual number of rows : 9994
-- Estimated number of rows : 100 ?
-- SQL Server cannot expand the multi statement table valued function
-- No use of statistic cause of the use of a table variable in the multi statement
-- table value function
-- Tabled variables do not have any statistics
-- Table '#A98990E0'. Scan count 1, logical reads 21
-- Event session : logical_reads 11412
SELECT *
FROM
mtvf_statisitc(0)
;
GO
-- Stop the session
IF NOT EXISTS
(
SELECT
*
FROM
sys.dm_xe_sessions
WHERE
name = N'io_reads'
)
ALTER EVENT SESSION io_reads
ON SERVER STATE = STOP;
GO