Database Reference
In-Depth Information
Listing 28-5. Examining comparison functions
select
xp.name as [Package]
,xo.name as [Comparison Function]
,xo.Description
from
sys.dm_xe_packages xp join sys.dm_xe_objects xo on
xp.guid = xo.package_guid
where
(xp.capabilities is null or xp.capabilities & 1 = 0) and
(xo.capabilities is null or xo.capabilities & 1 = 0) and
xo.object_type = 'pred_compare'
order by
xp.name, xo.name
Figure 28-9. Comparison functions that can be used in predicates
In contrast to Transact SQL, Extended Events support short-circuit predicate evaluation, similar to development
languages like C# or Java. When you have multiple predicates defined with logical OR and AND conditions, SQL Server
stops the evaluation as soon as the result is definitive. For example, if you have two predicates using the logical AND
operator, and the first predicate is evaluated as False , SQL Server does not evaluate the second predicate.
Collecting global attributes data adds slight overhead to predicate evaluation. It is helpful to write multiple
predicates in a way that the event data columns are evaluated prior to global attributes. such an approach can prevent
global attribute data collection due to short-circuiting.
Important
 
Search WWH ::




Custom Search