Viewing 15 posts - 16 through 30 (of 44 total)
Thanks for your kind replies.
Is you saying some thing like this to widen index,
CREATE NONCLUSTERED INDEX [IX_NAICSCode] ON [dbo].[SubCategoryNAICSCode]
(
[NAICSCode] ASC,[SubCategoryID]
)
It won't effect...
September 21, 2010 at 11:09 pm
How to widen index?
There are 13 million records in BusinessData
Table data,
BusinessData bdf = 13335713
SubCategoryNAICSCode subnaics = 79680
SubCategories sub = 344
Categories cat = 121
Industries ind = 6
September 21, 2010 at 4:57 am
Thanks your resposnses,
Here is the files attached again.
September 21, 2010 at 4:35 am
Thanks I have found some interesting result,
By Adding, WITH (INDEX (IX_BusinessDataState)) hint, and I get result 0.01 sec.
Select top 1001 bdf.*,sub.SubcategoryID,sub.SubCategoryName,cat.CategoryId,cat.CategoryName,
ind.IndustryID,ind.IndustryName from
BusinessData bdf WITH (INDEX (IX_BusinessDataState)),...
September 20, 2010 at 4:25 am
I am using top 1001 and execution plan are attached,
September 19, 2010 at 11:58 pm
Thanks for you replies,
My problem is only at this line,When I use
bdf.[State] like 'South Carolina%'
It takes 0.01 Sec
And when I use the same query with,
bdf.[State] like 'California%'
It takes 2.33...
September 19, 2010 at 11:22 pm
Thanks you very much Paul White NZ.
It works
April 3, 2010 at 7:27 am
The two employees that are associated with the most recent comments added. You always want to see two different employees. Is that correct?
Exactly I want the two different Latest Employee...
April 3, 2010 at 6:20 am
Thanks Paul,
I am expecting the output
A
B
Your Query is using Distinct Date which is not desired
I want the Query to Run is
SELECT DISTINCT TOP (2) EmpName
FROM Employee
ORDER BY EmpCommentsDate desc
I...
April 3, 2010 at 5:54 am
Correct
YES
December 23, 2009 at 7:13 am
Now what do you say man
set ANSI_NULLS ON
set QUOTED_IDENTIFIER ON
GO
ALTER FUNCTION [dbo].[GetTotal2](@RowId varchar(50),@ReportId varchar(50))
RETURNS varchar(50)
BEGIN
DECLARE @result varchar(50)
SELECT @result=[Total] FROM Maturity_Detail WHERE ([RowId]=@RowId)
AND [ReportId]=@ReportId
RETURN @result
END
set ANSI_NULLS ON
set QUOTED_IDENTIFIER ON
GO
ALTER...
December 23, 2009 at 7:08 am
Yes this is very good Point to implement this
December 23, 2009 at 6:55 am
>>Can you answer this: for any one reportID passed into the sproc to retrieve your data, what is the reportID returned by this bit:
... SELECT Top 1 ReportId FROM MaturitiesReports...
December 23, 2009 at 6:21 am
What do you mean Function is a poor programming practice?
December 23, 2009 at 5:34 am
Viewing 15 posts - 16 through 30 (of 44 total)