Viewing 14 posts - 1 through 14 (of 14 total)
The script Jonathan supplied should return all usage, including heaps which are in index usage stats as index_id = 0. Think of it like RAID 0; everything gets a...
March 7, 2016 at 10:09 am
If the clustered index is already mostly in cache it will be a lot of logical I/O, but no physical I/O. If you add a nonclustered index to that...
February 17, 2016 at 9:18 am
Test it. This will run different for you than it will run for anyone else.
We don't know if you're using leading wildcard characters, which would cause a...
February 17, 2016 at 7:22 am
It could have been worded better with the parent and referenced tables. I second guessed how I've been saying it with how it's worded in sys.foreign_keys.
In terms of calling...
February 11, 2016 at 2:46 pm
Thanks, Ed. You'll have to let me know how mine holds up.
February 10, 2016 at 5:40 pm
Chris Bell wrote something on that topic here: https://wateroxconsulting.com/archives/untrusted-foreign-keys/
It doesn't get into the details of how it can change execution plans which is what I think you're looking...
February 10, 2016 at 1:38 pm
Your timing on this question is great. I wrote an article on indexing of foreign keys for SSC, and it just went live this morning.
http://www.sqlservercentral.com/articles/foreign+keys/136445/
February 10, 2016 at 10:45 am
Jeremy, I went with the wording in sys.foreign_keys, but did second guess how I was wording it a couple times, too. Glad to see it wasn't just me.
February 10, 2016 at 10:41 am
If you have two date ranges, Start1 -> End1 and Start2 -> End2, see if they overlap with this:
Start1 <= End2 AND Start2 <= End1
February 10, 2016 at 10:20 am
There's several ways to do this.
- Look at what indexes (or heaps) are using the most space in memory using <a href="http://simplesqlserver.com/2016/01/04/query-the-buffer-pool/">Query the Buffer Pool</a>
- Look at sys.dm_db_index_usage_stats...
February 10, 2016 at 7:43 am
There's an added cost to have another NC index, and there's an added cost to having the FK do a scan for certain actions. Weigh the costs and do what's...
February 10, 2016 at 6:22 am
A couple things drive me nuts about how they do licensing now.
First, the list price scares people away while no one actually pays that much. If you...
February 2, 2016 at 2:32 pm
This relies on @@DateFirst = 7 (Sunday) and is based on the logic at this site: http://sqllessons.com/second_tuesday_of_the_month.html
DECLARE @FirstDayOfMonth_InThreeMonths DateTime2
, @SecondTuesdayOfMonth_InThreeMonths DateTime2
SELECT @FirstDayOfMonth_InThreeMonths = DATEADD(mm, DATEDIFF(mm,0,GETDATE())+3,0)
SELECT @SecondTuesdayOfMonth_InThreeMonths = DATEADD(D,...
January 19, 2016 at 12:21 pm
Viewing 14 posts - 1 through 14 (of 14 total)