Viewing 15 posts - 31 through 45 (of 105 total)
Please could you run this and post the result:
SELECT @@VERSION
October 21, 2010 at 2:55 am
This is a script for 2008 and you are running it in 2005. Everywhere that the date datatype is used needs changing to datetime or smalldatetime. Or see if there...
October 21, 2010 at 2:23 am
Best practice is be to remove the system functions on the data source columns if at all possible, which in this case it is.
Similarly, using a language independent date...
October 20, 2010 at 3:32 pm
GSquared (10/20/2010)
Split it on multiple lines.
Ha! Makes sense (although it would be nice if the validation checked the order of the symbols!). Thanks 🙂
October 20, 2010 at 2:19 pm
Hello
In order to make use of an index.... AND date_time >= '20090901' AND date_time < '20091001'
So those are your start and end times hard coded. Exactly how we parameterise these...
October 20, 2010 at 10:33 am
SELECT DATABASEPROPERTYEX('myDB', 'IsAutoUpdateStatistics')
peterzeke (10/20/2010)
October 20, 2010 at 9:17 am
As mentioned, statistics are another avenue to investigate. Are autoupdate statistics on? And if not, do you have a regular maintenance routine to selectively update them?
October 20, 2010 at 8:57 am
The parameter sniffing is at the sproc level.
I would google parameter sniffing in SQL. Your options depend on your circumstances and SQL Server version.
What I would definitely do first however...
October 20, 2010 at 8:55 am
I first saw that technique described by Adam Machanic http://sqlblog.com/blogs/adam_machanic/archive/2006/08/04/scalar-functions-inlining-and-performance-an-entertaining-title-for-a-boring-post.aspx
Although perhaps superficially similar, Itzik is really solving a slightly different problem - getting a scalar inline whereas you...
October 20, 2010 at 8:45 am
Have as many as you like it makes no difference - they are a mirage.
October 20, 2010 at 8:10 am
e.g.:
ALTER FUNCTION [dbo].[udf_RPT_NETWORK_PREVQTR_COND_RATE] ( @user-id INT )
RETURNS TABLE
AS
RETURN
(
SELECT
...
October 20, 2010 at 8:06 am
You could write that as an inline UDF - an inline UDF is a single SQL statement. Think of it like a view but that accepts parameters.
Do you see how...
October 20, 2010 at 8:00 am
peterzeke (10/20/2010)
October 20, 2010 at 7:25 am
You really need to specify if these are inline or multi statement. The SQL of Inline UDFs is decomposed into the entire execution plan. Multi statement table UDFs are like...
October 20, 2010 at 7:21 am
Viewing 15 posts - 31 through 45 (of 105 total)