Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 Mgt Studio - Slow data fetch if user def. datatype

Author  Topic 

walank
Starting Member

12 Posts

Posted - 2011-03-01 : 17:46:03
Hi,
In SQL Server 2008 R2 64bit Express Edition
I have a column which is using User-Defined datatype (defined as a list of values)
If I do "Edit 200 rows" on the computer with Mgt Studio connecting to the Server over LAN I can see how it is fetching records one by one - very slow - about 1 record per second. Same Edit on the server is fast as normal...

Is this another Mgt Studio bug or I have something not configured correctly?

Steps to reproduce:
CREATE RULE [dbo].[direction_rule]
AS
@list IN ('N', 'NE', 'E', 'SE', 'S', 'SW', 'W', 'NW');

CREATE TYPE [dbo].[direction] FROM [char](2) NOT NULL
(apply direction_rule to this type)

CREATE TABLE [dbo].[stateToStateDirection](
[id] [int] IDENTITY(1,1) NOT NULL,
[stateFrom] [char](2) NOT NULL,
[stateTo] [char](2) NOT NULL,
[direction] [dbo].[direction] NOT NULL)

insert about 100 records and try "Edit 200 records" in Mgt Studio connected to remote server over LAN.

Thanks,
Adam

robvolk
Most Valuable Yak

15732 Posts

Posted - 2011-03-01 : 17:52:31
Sounds more like a network traffic or client cursor issue than a user-defined type problem. If it really was a problem with the UDT you'd see performance problems regardless of connection.

BTW, SSMS Edit 200 rows is always slower than doing a normal SELECT query. If you really care about performance, stop using the GUI to browse data.
Go to Top of Page

X002548
Not Just a Number

15586 Posts

Posted - 2011-03-01 : 18:00:27
wrap your sql execution around

SET @s = GetDate()

your code

SET @e = GetDate()

SELECT DATEDIFF(ms,@s,@e) as TRANS_LEN

And tell us what TRANS_LEN is



Brett

8-)

Hint: Want your questions answered fast? Follow the direction in this link
http://weblogs.sqlteam.com/brettk/archive/2005/05/25/5276.aspx


Want to help yourself?

http://msdn.microsoft.com/en-us/library/ms130214.aspx

http://weblogs.sqlteam.com/brettk/

http://brettkaiser.blogspot.com/


Go to Top of Page
   

- Advertisement -