Viewing 15 posts - 7,636 through 7,650 (of 18,923 total)
SELECT * FROM (
SELECT 1 AS a UNION ALL
SELECT 2 UNION ALL
SELECT NULL) dt
ORDER BY a DESC
SELECT * FROM (
SELECT 1 AS a UNION ALL
SELECT 2 UNION ALL
SELECT NULL) dt
ORDER...
October 14, 2010 at 11:48 am
Because null will be at then end of that sort which seems to be what you want to do.
The question is simply : "In the Pry column, is there any...
October 14, 2010 at 11:45 am
optimising makes it 10 times worse?
Then I would suggest that someone sucks at optimizing :hehe:
I'm glad you got this figured out.
October 14, 2010 at 10:35 am
david_wendelken (10/14/2010)
Toby Harman (10/13/2010)
I think we should trust our co-workers in this wonderful game that is IT not to do the stupidest thing that we can think of, and maybe...
October 14, 2010 at 8:31 am
GilaMonster (10/13/2010)
Might be worth a read: http://sqlinthewild.co.za/index.php/2010/02/18/not-exists-vs-not-in/
Nice read. Always something more to [re]learn I guess :w00t:.
October 13, 2010 at 11:47 am
This assumes that both column are not nullable and that patid and facid and indexed in the same index in pat..patients
SELECT
patid + facid
FROM
...
October 13, 2010 at 10:43 am
Have you compared with left join query and not exists to see which one works better?
I personnally preffer to use not exists because in my mind it's clearer what the...
October 13, 2010 at 10:12 am
I would always add performance testing / tuning as #1 priority beyond "does it work as required?".
That MUST include not breaking anything else that was working before. A good...
October 13, 2010 at 10:09 am
Gianluca Sartori (10/13/2010)
Ninja's_RGR'us (10/13/2010)
SET @RND = (SELECT CAST(RAND() * 60 AS INT))
...
...
October 13, 2010 at 9:55 am
October 13, 2010 at 9:03 am
I'm sure that's not your final query because I've always had to present this in a calendar form to the final user but that gives you an idea :
create...
October 13, 2010 at 7:34 am
Start from a calendar table and filter between start date and end date
Left join that to your "days off" table based on the date only.
Group by date
having count(*) > 1
Now...
October 13, 2010 at 7:11 am
robbemorris (10/12/2010)
Wouldn't you have to arrange an asynchronous test to truly duplicate what is going on in production?
Not sure what you mean.
I had SSMS opened and I had 5 connections...
October 12, 2010 at 1:29 pm
I won't have time to finish those tests but I seem to be getting as much as 10-15% throughput increase with that little change and 1M updates in 2 minutes...
October 12, 2010 at 12:58 pm
Hence you'll need more hardware....
Or a difference solution.
40% is not "much" but as soon as you get a burst or cpu heavy query you're toasted.
But using a tinyint here wouldn't...
October 12, 2010 at 12:48 pm
Viewing 15 posts - 7,636 through 7,650 (of 18,923 total)