Viewing 15 posts - 38,251 through 38,265 (of 49,552 total)
Converting to varchar's one of the the slowest ways to trim the time from a date. Also watch out for the edge cases. Between's inclusive on both sides. If 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
June 23, 2009 at 5:25 am
CheckDB will never repair damage to any of the system tables.
Can you please run the following and post the entire output?
DBCC CHECKDB (< Database Name > ) WITH NO_INFOMSGS, ALL_ERRORMSGS
Take...
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
June 23, 2009 at 5:18 am
What error do you get if you remove yl_rangename from the select? (leave it in the group by)
One other thing. You should be able to remove the RTRIM from 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
June 23, 2009 at 2:58 am
Don't understand your question. A datetime has no defined format, it's a date, format is a string property. The format that you see in queries is defined by your regional...
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
June 23, 2009 at 2:58 am
Post the query?
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
June 23, 2009 at 2:06 am
In the reply screen, take a look to the left of the text area. You'll see several IFCode shortcuts. Highlight your code and click the code shortcut, or you can...
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
June 23, 2009 at 2:06 am
One way is to use Service broker. Set the procedure that you want to run async as the activation procedure for a service broker queue and send a message when...
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
June 23, 2009 at 1:37 am
SELECT TOP (100) ROW_NUMBER() OVER (ORDER BY Object_id)
FROM master.sys.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
June 23, 2009 at 1:33 am
DECLARE @TheDate DATETIME
SET @TheDate = '2008-01-01 12:12:12:223'
SELECT dateadd(dd, datediff(dd,0, @TheDate),0)
See http://sqlinthewild.co.za/index.php/2007/11/05/datetime-manipulation/
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
June 23, 2009 at 1:24 am
You could restore a backup of the master database that was taken before the tables were added. You do have a backup of master?
If you rebuild master you will lose...
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
June 23, 2009 at 1:22 am
Look at the joins. There's only one column from each table referenced in the joins. Hence to start with, create an index on each column that's referenced in the join...
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
June 23, 2009 at 1:08 am
How many rows are in the table Loja_Venda? Exec plan gives estimated 2.3 rows, actual 15 million, and that's for the results of an index scan with a predicate on...
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
June 22, 2009 at 3:31 pm
sarvesh singh (6/22/2009)
I'll read up more on this and do some tests on our test server before using it in live systems.
Don't use hints unless you are absolutely, totally, 100%...
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
June 22, 2009 at 2:58 pm
In most cases, SQL will only use a single index per table to satisfy a query. So, let's say that there's a query with a where clause like this
WHERE phone...
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
June 22, 2009 at 2:17 pm
Duplicate post. No replies to this thread please. Direct replies to:http://www.sqlservercentral.com/Forums/Topic739638-146-1.aspx
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
June 22, 2009 at 2:10 pm
Viewing 15 posts - 38,251 through 38,265 (of 49,552 total)