Viewing 15 posts - 47,776 through 47,790 (of 49,552 total)
Sure. Thing is with the rownumber, you'll only be reading the table once. With exists, you're reading it at least twice.
-- returns 10 rows for the second page of 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
January 5, 2008 at 8:56 am
Could you post the definitions of the two tables and all the indexes on them please.
All I can see from the exec plan is that you have two index scans....
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
January 5, 2008 at 8:55 am
Step 4: Rebuild all your indexes to undo the damage that ShrinkDatabase did to them
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
January 5, 2008 at 8:50 am
Turn traceflag 1204 on (DBCC TRACEON (1204)) then run your proc. You'll get a deadlock graph written to the error log that will tell you the two processes involved in...
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
January 5, 2008 at 8:38 am
Could be IO related, could be insufficient memory, could be network speed. Could also be memory and display time on the client. It's about 70 MB of data you're tossing...
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
January 5, 2008 at 8:36 am
The order of expressions in the where clause doesn't make the slightest difference. SQL will do them inn whatever order is most efficient, based on the data and the available...
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
January 5, 2008 at 8:25 am
Steve Ervolino (1/4/2008)
Thanks for the input. Unfortunately, that didn't help either. Seems that manipulating the date at all is enough for SQL to ignore the index.
Hmmm. Sometimes...
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
January 5, 2008 at 8:23 am
It's a pleasure, and thank you for the feedback.
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
January 5, 2008 at 8:09 am
There is no way to update any of the system tables in SQL 2005.
Try running a DBCC CheckDB on that database. I think checkDB checks the system catalogs, so...
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
January 5, 2008 at 7:48 am
With mine, the error is because you didn't create the function DateMonthStarts. It's not an inbuilt SQL function. The contents of the function can be found on the page I...
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
January 5, 2008 at 7:35 am
Have a look at the hash_bytes function. Might do what you want. There's also checksum and checksum_agg
I'm not sure they're sufficient for what you're trying to do, but they might...
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
January 4, 2008 at 8:21 am
Use query analyser. While they run the same code, if the operation takes too long, enterprise manager may timeout and undo the operation. Query analyser doesn't timeout.
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
January 4, 2008 at 8:14 am
It's not the concat that's the problem, it's the variable usage.
If a query uses either parameters or hard coded values, the optimiser knows, at the point that it's compiling and...
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
January 4, 2008 at 8:12 am
In that case, since you're not building up a string, you don't want the quotes. In the first case, you were building up a string to be executed, so the...
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
January 4, 2008 at 7:15 am
If you have queries of the form
WHERE EmpID = @Emp AND DeptID = @Dept, then only one of the indexes will be used. Which one depends on the selectivity...
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
January 4, 2008 at 7:02 am
Viewing 15 posts - 47,776 through 47,790 (of 49,552 total)