• Scott Coleman (3/6/2015)


    Hopefully the CRM app rarely does "SELECT * FROM dbo.notes" on the whole table, so doing that in Management Studio is not a useful test. You're just stressing the network. Access can go to the last row very quickly, but so can Management Studio if you only ask for the last row (assuming that ids are sequential):

    SELECT TOP (1) * FROM dbo.notes ORDER BY id DESC

    You could look at the missing index dmv to get suggestions on indexes that might improve performance. Or be an old-school DBA and use SQL Profiler to capture the worst-performing SQL statements, then use Database Tuning Advisor to get ideas.

    You might also look at table fragmentation, particularly if ids are nonsequential. That VARCHAR(36) datatype doesn't mean it's a random GUID converted to text, does it?

    I'm betting there are 6 GUIDs in that table! :w00t:

    Best,
    Kevin G. Boles
    SQL Server Consultant
    SQL MVP 2007-2012
    TheSQLGuru on googles mail service