Threshold
Nov 3, 1998is there any threshold manager in the ms sql server? like in the
transaction log, where you can add a stored proc that
will dump the tran log everytime a threshold is hit.
thnks.
is there any threshold manager in the ms sql server? like in the
transaction log, where you can add a stored proc that
will dump the tran log everytime a threshold is hit.
thnks.
Hi,
I have a table with 188376 rows and the data size = 3012 KB, index size = 5884 KB .
LE threshold max is set to 2000 and LE threshol percent to 20%
I have an index on that table and observed that it is not getting used.
I would like to know whether sql optimizer uses the index based on the cost
of the query plan or does the table scan once the LE thresholdlimit is reached
overriding the optimized plan.
thanks,
MMS
Guys I am really stuck on this one. Any help or suggestions would beappreciated.We have a large table which seemed to just hit some kind of threshold.They query is somewhat responsive when there are NO indexes on thetable. However, when we index email the query takes forever.FACTS- The problem is very "data specific". I can not recreate theproblem using different data.- There is only a problem when I index email on the base table.- The problem goes away when I add "AND b.email IS NOT NULL" to theinner join condition. It does not help when I add the logic to the"WHERE" clause.DDLCREATE TABLE base (bk char(25), email varchar(100))create clustered index icx on base(bk)create index ix_email on base(email)CREATE TABLE filter (bk char(25), email varchar(100))create clustered index icx on filter (bk)create index ix_email on filter (email)QuerySELECT b.bk, b.emailFROM base b WITH(NOLOCK)INNER JOIN filter f ON f.email = b.email--and f.email is not nullData Profile--35120500, 35120491, 14221553SELECT COUNT(*) ,COUNT(DISTINCT bk), COUNT(DISTINCT email)FROM base--16796199, 16796192, 14221553SELECT COUNT(*) ,COUNT(DISTINCT bk), COUNT(DISTINCT email)FROM baseWHERE email IS NOT NULL--250552, 250552, 250205SELECT COUNT(*) ,COUNT(DISTINCT bk), COUNT(DISTINCT email)FROM filter--250208, 250208, 250205SELECT COUNT(*) ,COUNT(DISTINCT bk), COUNT(DISTINCT email)FROM filterWHERE email IS NOT NULL
View 18 Replies View RelatedHi allI have a large data set of points situated in 3d space. I have a simpleprimary key and an x, y and z value.What I would like is an efficient method for finding the group ofpoints within a threshold.So far I have tested the following however it is very slow.---------------select *from locations a full outer join locations bon a.ID < b.ID and a.X-b.X<2 and a.Y-b.Y<2 and a.Z-b.Z<2where a.ID is not null and b.ID is not null---------------If anyone knows of a more efficient method to arrive at this results itwould be most appreciated.Thanks in advanceBevan
View 8 Replies View RelatedI am doing workload analysis on SSAS - Tabular (2012), I have perfmon logs captured and want to run through PAL. I am looking out for threshold file for SSAS tabular 2012/2014.
View 2 Replies View RelatedThe below stored procedure is used to create a vertical benchmark line on the X-Axis which has a hour scale. I use the stored procedure to find out which temperature crosses or equals the threshold temperature (340), then plot the vertical benchmark line at the hour the first temperature is equal to or greater than 340 degrees and less than 1000 degrees.
The logic below works if the temperature is equal to or greater than 340 degrees and less than 1000 degrees. THE ISSUE is I have 8 temperatures if they don't cross the threshold of 340 degrees I need to set a default value for my vertical line. In other words if the temperature is 180 and my threshold is 340 then set my vertical line on the highest temperature close to 340.
I tried removing my Where clause (but then it breaks the logic for those temperatures that are equal to or greater than 340). I tried using Case When but this didn't give me what I want either. I tried UNION as well. All giving me results I don't want.
Here is what I am looking for:
This first example is one where there was a temperature that was equal to or greater than the threshold of 340 degrees. This is CORRECT
Code:
first_to_cross_thresholdAgeSampleDateDiffAgeovenStartTimestampAgeovenCompleteTimestamp
2014-02-04 19:24:003.3500002014-02-04 16:02:13.0002014-02-05 05:02:13.000
If 8 temperatures did not equal or cross the threshold then give me the hour of the highest temperature close to the threshold but do not return 0.
For Example:
temp1 92
temp2 108
temp3 0
temp4 284 <<< this is the closest to the threshold so give me the hour when this occurred.
temp5 2192 *Remember I can only count temperatures less than 1000 degrees. Anything above 1000 degrees mean there is nothing in the oven. So it is false/positive.
temp6 102
temp7 0
temp8 12
Code:
first_to_cross_thresholdAgeSampleDateDiffAgeovenStartTimestampAgeovenCompleteTimestamp
2014-02-05 00:30:001.3000002014-02-05 02:00:13.0002014-02-05 02:00:13.000
Code:
CREATE PROCEDURE [dbo].[AgeScoreCardThreshold_JJ_12232013]
-- Add the parameters for the stored procedure here
@LicenseNumber int = NULL,
@Lot varchar(50) = NULL
[code].....
According to BOL you can configure an Alert to notify you when the blocked process threshold has been exceeded:
SQL Server 2005 Books Online
blocked process threshold Option
Use the blocked process threshold option to specify the threshold, in seconds, at which blocked process reports are generated. The threshold can be set from 0 to 86,400. By default, no blocked process reports are produced. This event is not generated for system tasks or for tasks that are waiting on resources that do not generate detectable deadlocks. For more information about deadlock detection, see Detecting and Ending Deadlocks.
You can define an alert to be executed when this event is generated. So for example, you can choose to page the administrator to take appropriate action to handle the blocking situation.
Can someone provide some direction on exactly how this is done? Does it require a Service Broker and queue?
Referencing an article regarding MAXDOP and cost threshold for parallelism from Brent Ozar's website: [URL] .....
We have a 2 physical CPUs that are 4 cores each with hyper threading enabled. When looking through the task manager, under the performance tab, I see 16 CPU threads.We have set the MAXDOP value is set at 4.
Reading further, cost threshold for parallelism setting is recommended at 50 to start with.
Our setting is at the default 5.
I have a table that is made up of the sum of medical, mental health and pharmacy claims. I would like to query that to find instances when the sum of the three claims types are greater than a predetermined threshold.
For example:
Patient 1 Medical = 10,000 (could be 10 records at 1,000 each)
Patient 1 Mental Health = 5,000
Patient 1 Pharmacy = 15,000
Patient 2 Medical = 1,000
Patient 2 Mental Health = 0
Patient 2 Pharmacy = 500
Threshold is 25,000
If I queried the above sample table I would get one record:
Patient 1 30,000 - because 10,000+5,000+15,000 = 30,000 and is greater than the threshold.
I am not sure that a having clause would work though.
What is the best practice in setting a minimum support threshold for market basket analysis? Is there a formula? Does it depend on ROI you predict?
View 4 Replies View RelatedI want to configure an alert which notifies me if any of my database log files size exceeds a certain threshold percentage.
View 6 Replies View RelatedI am trying to script a case when to achieve the following.
I have a table of measures with certain threshold. The threshold direction can either be > or < so I want to create a field that shows if the measure hits that threshold or not to be later picked up in SSRS. So a nested case when?
CASE WHEN M.[Threshold Direction] = '>' THEN
CASE WHEN A.[Value] > M.[Threshold] THEN 'GREEN'
CASE WHEN A.[Value] < M.[Threshold] THEN 'RED'
ELSE ''
END END END AS 'Condition'Is this at all possible?
I right in thinking that if the estimated subtree cost is higher than the cost threshold for parallelism then it will use a parallel plan? If so, I've read the cost threshold is measured in minutes but is the subtree cost measured in something else, the mysterious cost number? And if so, how are the two compared?
View 9 Replies View Related