bin/XEtemplates/Query Wait Statistics.xml

<event_sessions xmlns="http://schemas.microsoft.com/sqlserver/2008/07/extendedeventconfig">
   <event_session name="Query Wait Statistics" maxMemory="4" eventRetentionMode="allowSingleEventLoss" trackCausality="false" dispatchLatency="30" maxEventSize="0" memoryPartitionMode="none">
    <templateCategory>
      <!-- _locID_text="templateCategory" _locComment = "" -->Everyday Extended Events</templateCategory>
    <templateName>
      <!-- _locID_text = "templateName" _locComment = "" -->Query Wait Statistics</templateName>
    <templateDescription>
      <!-- _locID_text = "templateDescription" _locComment = "" -->Description</templateDescription>
      <event package="sqlos" name="wait_completed">
         <action package="sqlserver" name="database_id" />
         <action package="sqlserver" name="database_name" />
         <action package="sqlserver" name="is_system" />
         <action package="sqlserver" name="session_id" />
         <parameter name="collect_wait_resource" value="1" />
         <predicate>
            <and>
               <leaf>
                  <comparator name="greater_than_uint64" package="package0" />
                  <global name="database_id" package="sqlserver" />
                  <value>4</value>
               </leaf>
               <leaf>
                  <comparator name="not_equal_boolean" package="package0" />
                  <global name="is_system" package="sqlserver" />
                  <value>false</value>
               </leaf>
            </and>
         </predicate>
      </event>
      <event package="sqlos" name="wait_info">
         <action package="sqlserver" name="database_id" />
         <action package="sqlserver" name="database_name" />
         <action package="sqlserver" name="is_system" />
         <action package="sqlserver" name="session_id" />
         <predicate>
            <and>
               <leaf>
                  <comparator name="greater_than_uint64" package="package0" />
                  <global name="database_id" package="sqlserver" />
                  <value>4</value>
               </leaf>
               <leaf>
                  <comparator name="not_equal_boolean" package="package0" />
                  <global name="is_system" package="sqlserver" />
                  <value>false</value>
               </leaf>
            </and>
         </predicate>
      </event>
      <event package="sqlos" name="wait_info_external">
         <action package="sqlserver" name="database_id" />
         <action package="sqlserver" name="database_name" />
         <action package="sqlserver" name="is_system" />
         <action package="sqlserver" name="session_id" />
         <predicate>
            <and>
               <leaf>
                  <comparator name="greater_than_uint64" package="package0" />
                  <global name="database_id" package="sqlserver" />
                  <value>4</value>
               </leaf>
               <leaf>
                  <comparator name="not_equal_boolean" package="package0" />
                  <global name="is_system" package="sqlserver" />
                  <value>false</value>
               </leaf>
            </and>
         </predicate>
      </event>
      <target package="package0" name="ring_buffer">
         <parameter name="max_memory" value="102400" />
      </target>
   </event_session>
</event_sessions>