Archives by date

You are browsing the site archives by date.

Sql Server Indexes, Slow searching, query optimization

Here’s a quick way to find missing indexes in sql server: SELECT migs.group_handle, mid.*FROM sys.dm_db_missing_index_group_stats AS migsINNER JOIN sys.dm_db_missing_index_groups AS mig ON (migs.group_handle = mig.index_group_handle)INNER JOIN sys.dm_db_missing_index_details AS mid ON (mig.index_handle = mid.index_handle) For more info: Microsoft Technet

jQuery UI AutoComplete, .NET Web Service, Limit database hits with custom caching

I love jQuery UI; I’ve been using it for everything lately. I’m using jQuery UI Autocomplete on several pages, mostly for name searches. I wanted to create some custom caching to limit the hits to my database; here’s what I came up with: var cache = {}; $j(function () { $j(“#“).autocomplete({ source: function (request, response) [...]

SQL – Select top n or top 1 of group by in same table

I had a table called test w/testid & testname (about 45 different tests total), as well as a prospect table w/over 20,000 records with a testid field containing the various tests available. I wanted to get the top 1 of each unique test. If you are using sql 2005/2008; here’s how u can accomplish this: [...]