184 reputation
211
bio website
location
age
visits member for 1 year, 10 months
seen Oct 31 at 17:46

Jul
2
awarded  Curious
May
28
awarded  Popular Question
May
5
awarded  Popular Question
Feb
12
awarded  Notable Question
Sep
5
awarded  Popular Question
Jul
8
accepted When do you add your foreign keys?
Jul
8
comment When do you add your foreign keys?
That was my initial inclination as well, and seeing that I work for a small company and rarely get outside opinions on menial things like this, this was good to know. Gracias.
Jul
8
asked When do you add your foreign keys?
May
20
awarded  Caucus
May
20
awarded  Constituent
Mar
31
comment Why is a hash match operator in this very basic query
Will do sir, thanks :)
Mar
31
accepted Why is a hash match operator in this very basic query
Mar
31
comment Why is a hash match operator in this very basic query
I was writing a lot of queries that did a lot of heavy duty work with the temporal aspect (fill date, script end date) of the data and I was trying whatever I could to get them sped up. There was another candidate key but I never joined on it because it was just a unique identifier of 12 alphanumeric characters. I was instead joining on a calendar table a lot to see the number and type of drugs prescribed on a given day, or during a given time period
Mar
31
comment Why is a hash match operator in this very basic query
So from that you could see my confusion when a perfectly good index is there :)
Mar
31
comment Why is a hash match operator in this very basic query
From the SQL Server Bible 2008 A hash match is an unordered join method that builds a temp table and iteratively matches with data from another table. A hash match is more efficient if one table is significantly larger than the other table. This is the worst-case join method and is used when no suitable index is available.
Mar
31
comment Why is a hash match operator in this very basic query
When parallelism happens is the work being done by different processor cores or are there too many unknowns to be able to answer that? (or is that a poor question to ask) So it seems there are times that it's unavoidable to have a hash match in your execution plans and you shouldn't always strive to compeletely eliminate them?
Mar
31
asked Why is a hash match operator in this very basic query
Mar
12
awarded  Critic
Feb
15
comment Indexing strategy when using the between operator SQL Server 2008
As of right now, this query does generate non-overlapping date ranges. Consider this output <a href="imgur.com/RL7MKsB">here </a>. You can see that within the first two days while that the dates that would otherwise overlap, are made disparate because this person was prescribed another drug from 11-28 until 12-07. They they went down to their normal two. If I hadn't implemented the count(distinct drug_name) these rate ranges would be totally different because the two or three days that a person had a repeat script filled would be captured differently.
Feb
13
awarded  Commentator