Viewing 15 posts - 3,676 through 3,690 (of 7,614 total)
As I stated in my comments, IF the queries are (almost) always for birthdays in a month / range of days, a clustered index on a base-dated dob should give...
November 28, 2017 at 11:02 am
There actually is, in theory, a fundamental difference between those queries:
The first query will drop/ignore any row that does not have a matching row in the Account table,...
November 28, 2017 at 10:45 am
I suggest you do it this way, which will make the output easier to use (at least for me):
DECLARE @command varchar(1000)
SELECT @command = '
November 24, 2017 at 12:21 pm
It makes zero sense to pull out just the month and index it. You'd be far better off indexing the date with a dummy year.
And if one (almost)...
November 24, 2017 at 8:02 am
November 22, 2017 at 12:25 pm
I have used views for that, but only for a very limited number of values, since it can't be effectively indexed.
Unique indexes are potentially extremely valuable, even for...
November 22, 2017 at 11:59 am
Or take a step back and consider whether "dob" shouldn't be stored as separate columns to begin with, in accordance with standard data normalization (if you need to constantly look...
November 22, 2017 at 11:54 am
While it's still available in the cache, just at it would be for index_usage_stats, you can likely use:
sys.dm_db_index_operational_stats
If the table is active, that data is very...
November 22, 2017 at 11:40 am
As a very slight simplification, you could also do this (I prefer CAST when possible since it's ANSI-standard, whereas CONVERT is not):
CAST((CP + 9) / 10 AS int)
November 22, 2017 at 11:36 am
November 20, 2017 at 10:42 am
The key thing to remember is this:
Data does not have to stored in physical sequence in order to be able to read in key sequence.
That is, the...
November 17, 2017 at 11:26 am
Viewing 15 posts - 3,676 through 3,690 (of 7,614 total)