3,741 reputation
1615
bio website lobsterpot.com.au
location Adelaide, Australia
age 39
visits member for 2 years, 10 months
seen 4 hours ago

Owner / Principal at LobsterPot Solutions

Adelaide (Australia) based SQL MVP

On twitter @rob_farley

Blog at http://sqlblog.com/blogs/rob_farley
(Old blog at http://msmvps.com/blogs/robfarley)


Aug
7
answered Filtered index not chosen, and rejected with hint
Jul
25
comment View with left joins are very slow
Start by getting rid of the word "distinct". And consider looking at the Execution Plan to get a feel for how the query is running. You may like NCIXs.
Jul
14
answered Update row where associated row does not exist
Jul
2
answered Using the “Select Top (100) percent vs. Select * , or selecting any column”
Jul
1
answered Table income and expense is better to have it together or apart
Jun
30
comment Performance tuning a Great Circle distance calculation
...there's no need to do the IN bit at all. It really won't help at all.
Jun
30
comment Performance tuning a Great Circle distance calculation
Just use: select <columns> from locations loc left outer join baseline base on base.location_geo.STDistance(loc.location_geo) <= 0.00015678559
Jun
30
comment Retrieving data from SQLServer mutitenant database
Shouldn't need to set the owner. They just need permission to read the tables in the schema.
Jun
29
answered Retrieving data from SQLServer mutitenant database
Jun
29
answered How to repair backup of .mdf file database?
Jun
29
comment Finding the highest quarter of the year
No, Q2 2013 has 15+20.
Jun
29
answered Finding the highest quarter of the year
Jun
27
comment Performance tuning a Great Circle distance calculation
Great. 30 seconds still seems slow to me - I'm sure you could get it down much further. Can you show the query you're using now?
Jun
27
comment Performance tuning a Great Circle distance calculation
Mark - I would recommend you don't divide your distance by 1000, but rather multiply your 5000 by 1000. That way, it can leverage a spatial index much more easily.
Jun
26
answered Performance tuning a Great Circle distance calculation
Jun
3
comment Delete and Update of Foreign keys
Ok. If it goes to the new one, just make sure you don't change the primary key in that table, so that any references to it don't get lost. So the "logical delete" technique should work.
Jun
3
answered Delete and Update of Foreign keys
Jun
2
answered SQL Server 2012 Agent Job not providing full failure message for SSIS Packages
Jun
1
comment How do I make SQL Server database accessible to PC's on the LAN?
Odd - I didn't see the comment until now. Blaž is right, I meant the application you're using to connect. It doesn't even have to be SSMS, it could be whatever application is being used.
May
31
answered How do I make SQL Server database accessible to PC's on the LAN?