Viewing 15 posts - 46,786 through 46,800 (of 49,552 total)
SELECT LEFT(<Some Column>,8) FROM ....
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
April 23, 2008 at 1:43 pm
SQL's native backups do not allow you to just restore a single table. You'll have to restore the entire database either as a new DB on the same server 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
April 23, 2008 at 1:34 pm
So it's management studio's local work space. Good to know.
Try opening the file in notepad. I'd be interested to know if it's the query in there, or the results. 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
April 23, 2008 at 1:22 pm
Yup. Should be fine.
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
April 23, 2008 at 1:08 pm
Is it a SQL 2000 or a SQL 2005 database?
Databases cannot be downgraded in version. If the DB in question was detached from SQL 2005, it has to be...
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
April 23, 2008 at 1:06 pm
Usually its enough to have 2 files on the same drive. If you're seeing IO bottlenecks on that drive, you may want to separate the data files onto different drives.
It...
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
April 23, 2008 at 12:56 pm
The SQL database engine doesn't use temp files and certainly not in those directories. It uses TempDB for its temporary work space. Otherwise it uses its allocated memory.
It could be...
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
April 23, 2008 at 12:49 pm
You should be able to safely drop the index on testplan. Not the others.
An index is redundant if the columns in it are a left-based subset of another index.
If...
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
April 23, 2008 at 12:36 pm
Look up sp_executesql. It allows you to pass parameters in and out of dynamic SQL. I know there's a good example in books online showing exactly that.
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
April 23, 2008 at 12:33 pm
I'd say use the dm_exec_query_stats. I believe there is a DBID in there. The plan cache is transcient, so commands may get removed from the cache and not all statements...
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
April 23, 2008 at 12:27 pm
The keyword AS for specifying an alias is optional. These are equivalent statements
SELECT 1 AS This_Is_A_Column_Alias FROM SomeTable AS This_Is_A_Table_Alias
SELECT 1 This_Is_A_Column_Alias FROM SomeTable This_Is_A_Table_Alias
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
April 23, 2008 at 12:25 pm
Be aware that LEN does not count trailing spaces.
SELECT LEN('abc') -- 3
SELECT LEN('abc ...
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
April 23, 2008 at 12:21 pm
Yes. I was more referring to the other NC indexes.
As I mentioned in another thread, that cluster is exceedingly wide. The recommendations for clustered indexes is that they are as...
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
April 23, 2008 at 12:18 pm
What's the name of that file?
It's possible that it's the windows swap file, which means SQL's using more memory than the machine has available and windows is swapping it to...
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
April 23, 2008 at 12:17 pm
Without seeing the table structure, or the index definitions, it's hard to say.
You could probably widen a couple of the indexes and it would reduce the lookups. Without knowing 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
April 23, 2008 at 11:20 am
Viewing 15 posts - 46,786 through 46,800 (of 49,552 total)