Viewing 15 posts - 45,901 through 45,915 (of 49,552 total)
Sorry, my mistake. The exec line should have been.
EXEC (@sSQL)
Note the brackets.
The reasons table is dynamic (we add reasons once in a while) and I'm making a summary of this...
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
July 7, 2008 at 4:01 am
What error are you getting?
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
July 7, 2008 at 3:54 am
mahesh.kumar (7/7/2008)
Won't this composite non clustered index give a problem while inserting?.
Shouldn't. It'll slow the insert a little, but unless you have lots and lots of indexes you should...
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
July 7, 2008 at 3:54 am
Based on the sample you gave, what do you want returning?
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
July 7, 2008 at 3:48 am
Could be fragmentation, could be out of date statistics. There are reasons for SQL not to use an index that looks perfect.
Edit: Sounds like it could also be parameter sniffing.
Could...
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
July 7, 2008 at 3:47 am
Please could you post your table definition, sample data (as insert statements) and desired output
see - http://www.sqlservercentral.com/articles/Best+Practices/61537/
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
July 7, 2008 at 1:11 am
You can't use variables within an alter table statement. You're going to need dynamic SQL for this.
DECLARE @Reason nvarchar(10), @sSQL NVARCHAR(500)
DECLARE cr cursor local FAST_FORWARD for
SELECT DISTINCT [Reason]
FROM Reason_T
open cr
fetch...
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
July 7, 2008 at 1:11 am
Ah. In that case, please could you post the schema for the table you have the DB names in, a couple of rows from that table and the result you...
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
July 7, 2008 at 12:57 am
DamienB (7/7/2008)
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
July 7, 2008 at 12:49 am
In that case, you need to cover that query for the index to be remotely useful. It's not selective enough otherwise.
CREATE NONCLUSTERED INDEX idx_gpsdatahistory1April_RegistrationNoGpsDate
ON gpsdata_history1_April (Registrationno, gps_datetime)
INCLUDE...
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
July 7, 2008 at 12:41 am
Jeff Moden (7/7/2008)
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
July 7, 2008 at 12:38 am
peace2007 (7/6/2008)
I'd like to monitor my stored procedures on another server. I think I should use SP_Counts or TSQL_SPs templates but what if I need a...
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
July 7, 2008 at 12:29 am
Doctor Who 2 (7/5/2008)
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
July 7, 2008 at 12:24 am
Steve Jones - Editor (7/6/2008)
I think the simulation path is the way to move. I know lots of people were tripped up on the 70-431 sims of SSMS.
Yup. Several of...
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
July 7, 2008 at 12:18 am
swtrans (7/6/2008)
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
July 7, 2008 at 12:08 am
Viewing 15 posts - 45,901 through 45,915 (of 49,552 total)