Viewing 15 posts - 43,981 through 43,995 (of 49,552 total)
IntellectYog (10/7/2008)
Hi GailTnx. for very fast reply.
Can u explain me in brief?
What do you want explaining?
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
October 7, 2008 at 1:35 am
Is this for a demo or presentation or similar?
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
October 7, 2008 at 1:35 am
It's basically saying that you are asking for a single row to be deleted, but if it does the delete, two will go. To delete only one of duplicate set,...
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
October 7, 2008 at 1:28 am
zespri (10/6/2008)
Also in SQL Server Books Online it is stated :
•Serializable (the highest level, where transactions are completely isolated from one another
This is not entirely correct. Two Serializable transactions...
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
October 7, 2008 at 1:09 am
My first suggestion would be to optimise the proc. Replace those cursors with set-based code that should run a lot faster. If you're doing cross tabs, look up the PIVOT...
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
October 7, 2008 at 12:57 am
Without indexes SQL has to do table scans and hence will take table-level locks. With appropriate indexes, SQL can take more granular locks and hence the two connections don't block...
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
October 7, 2008 at 12:54 am
What's it doing that it shouldn't be or not doing what it should?
Basically, can you give us a little more detail on what's wrong?
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
October 6, 2008 at 2:11 pm
Again because of the varchar/nvarchar
In fn_get_sql, the text column is of type text, is a non-unicode value, so datalength returns the length of the string and hence dividing that by...
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
October 6, 2008 at 2:08 pm
That should work.
Just one thing, you don't need the second if exists. Just put the update in the else part of the if.
As it's currently written, the second if exists...
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
October 6, 2008 at 2:04 pm
homebrew01 (10/6/2008)
Yes .... I'm a few steps backwards compared to my last position ... !
Look at it as an opportunity. 😉
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
October 6, 2008 at 12:43 pm
Try adding the indexes back after inserting the data but before querying it. If you're doing more than 1 or 2 queries, you may well see a large benefit.
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
October 6, 2008 at 12:34 pm
How about something like this?
select < column list > from users inner join
(SELECT User_ID, MAX(Start_Date) as LatestStartDate FROM Users group by User_ID) sub
on Users.User_ID = sub.User_ID 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
October 6, 2008 at 12:30 pm
Two questions.
Why do you only want to insert/update the first row if there are multiple rows in the insert?
How do you define 'first row'? SQL doesn't put any meaning 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
October 6, 2008 at 12:18 pm
Less on the security and more on the performance, see if you can secure a separate server for dev/test. Letting developers develop on the prod box is asking for an...
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
October 6, 2008 at 12:11 pm
The temp table will be automatically dropped when the procedure that created it ends or the connection that created it closes. It's exactly the same whether you explicitly create 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
October 6, 2008 at 10:15 am
Viewing 15 posts - 43,981 through 43,995 (of 49,552 total)