318 reputation
17
bio website
location
age
visits member for 3 years, 2 months
seen Oct 23 at 6:40

Feb
28
accepted Spatial index not used
Feb
27
asked Spatial index not used
Feb
25
comment How to calculate the hours worked by all employees in a day?
You are indicating he needs a column for in & out instead of 2 rows for in & out. I think that the first table the OP mentions isn't really a table by design but an imported csv file from a time-tracking device for employees. he's trying to convert that flat table to the second table.
Feb
25
awarded  Commentator
Feb
25
comment How to calculate the hours worked by all employees in a day?
His first schema will be the output of some hardware device registering whenever a specific employee passes a certain point.
Jan
10
comment What is the effect of replacing indexes with filtered (non-null value) indexes?
"Query parameterisation doesn't work with filtered indexes" . this can probably be fixed with option(recompile)
Jan
4
comment What can cause slow queries with low resource usage?
Do you notice lockwaits while the query is running?
Jan
2
awarded  Supporter
Jan
2
comment Archery League Database design
With a connection from player to league and you don't need the arrow table unless it is important to know what arrow has been fired in the shot
Jan
2
answered Archery League Database design
Jan
2
comment Adding index in table suggestion?
You don't want to rewrite this in a union :) . Here's some more info about the union syntax: technet.microsoft.com/en-us/library/ms180026.aspx
Jan
2
answered Adding index in table suggestion?
Jan
2
comment Adding index in table suggestion?
@ypercube . A UNION is almost always a bad idea in terms of performance
Jan
2
answered MySQL - INSERT … SELECT .. FROM .. - Single transaction or transaction per row?
Jan
2
comment creating a historical database, need help making a decision
Can multiple operations run in parallel? Why would a row not get closed but a new step inserted right? You can avoid that by encapsulating the 2 queries(update & insert) in a transaction
Dec
30
awarded  Critic
Dec
29
comment Should I add multiple secondary indexes to search
you should be using isnull for dynamic sql queries: AND Zip=isnull(@paramzip,Zip) . SQL can create much better plans
Dec
27
comment Identical query & instance but other execution plans & performance
@Martin, option(recompile) does the trick. If you post it as an answer I will mark it so
Dec
27
answered Copying a restoring database in SQL Server 2012
Dec
27
asked Identical query & instance but other execution plans & performance