Viewing 15 posts - 46,366 through 46,380 (of 49,552 total)
A primary key is the row's unique 'identifier'. A clustered index defines the physical order of the data. The are unrelated.
By default, when you create a primary key, it's enforced...
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
May 27, 2008 at 8:05 am
Try building up your strings and placing them in variables then passing those variables to sp_executesql. I seem to recall that concatenating bits of string in the call to 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
May 27, 2008 at 6:46 am
If I may suggest - remove the extract from a wrox book as it is probably (at best) borderline copyright infringement - posting copyrighted works on a public forum.
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
May 27, 2008 at 6:40 am
Jeff Moden (5/27/2008)
Must be the language barrier, huh?
I would hope so. Though I have a feeling some people think we work for SSC and get paid to answer...
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
May 27, 2008 at 6:18 am
Check the remote server. You may very well find an access violation/stack dump.
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
May 27, 2008 at 6:01 am
niranjankumar_k (5/27/2008)
do u say is it correct way to create unique index for all select list column ????
No. I said that was a solution to the small query 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
May 27, 2008 at 5:57 am
Try DBCC INPUTBUFFER(@@SPID).
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
May 27, 2008 at 5:55 am
This should work.
SELECT original_login(), local_net_address, text
FROM sys.dm_exec_requests er
INNER JOIN sys.dm_exec_connections ec on er.session_id = ec.session_id
CROSS APPLY sys.dm_exec_sql_text (er.sql_handle)
where er.session_id = @@SPID
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
May 27, 2008 at 5:36 am
The simple query you posted has a simple index fix, and Barry gave it to you on page 1 of this thread
http://www.sqlservercentral.com/Forums/FindPost506666.aspx
Other queries, especially if they have lots of columns...
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
May 27, 2008 at 5:32 am
If you could give us the table definitions, the index definitions and the query, it would really help.
Also, copy the entire execution plan to excel (not just the 1st column...
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
May 27, 2008 at 4:35 am
eddy (5/27/2008)
if i then also take a full backup using sqlserver on a certain point will the log chain not be broken eg, possible restore with red gates sqlbackup.?
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
May 27, 2008 at 3:28 am
It says that running the query require SQL to read almost half a million pages. That's an awful lot. The fewer IOs done by a query, the better
Is that with...
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
May 27, 2008 at 3:18 am
TempDB -no. It's recreated every time the service starts.
Model - not unless you've made changes to it.
MSDB - yes. It's where your job definitions and history, backup histories, SSIS/DTS packages...
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
May 27, 2008 at 2:15 am
No. Those are execution statistics.
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
May 27, 2008 at 1:59 am
Maybe. What do you want the query to return?
What indexes do you have on the tables?
Can you give us the table creation script (CREATE TABLE ...), index definitions, sample data,...
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
May 27, 2008 at 1:19 am
Viewing 15 posts - 46,366 through 46,380 (of 49,552 total)