Viewing 15 posts - 6,586 through 6,600 (of 10,144 total)
There is of course a cost associated with maintaining an index - another subject.
Here's a few changes. Check out how long it takes to run, then I guess it's the...
October 18, 2011 at 2:01 am
Ninja's_RGR'us (10/17/2011)
I'd be most happy to be proven wrong... 😉
Heh we both know that's not going to happen! BUT - I reckon I can get close to your solution...
October 17, 2011 at 7:55 am
Ninja's_RGR'us (10/17/2011)
You want quantum leap improvement? You make that index with all the included...
October 17, 2011 at 7:50 am
adlakha.22 (10/17/2011)
and at the same time i again execute the query with Ix_new that was taking 30 sec,(may be there was a n/w problem...
October 17, 2011 at 7:41 am
Jeff Moden (10/16/2011)
GilaMonster (10/15/2011)
Jeff Moden (10/15/2011)
Heh... nah... you're a good friend... so I thawed the chops for ya. 😛
And even de-boned and par-cooked em to be really nice.
That was just...
October 17, 2011 at 6:58 am
Ninja's_RGR'us (10/17/2011)
Might be worth it, might now. I...
October 17, 2011 at 6:49 am
Now try this:
IF OBJECT_ID('tempdb..#prodline') IS NOT NULL DROP TABLE #prodline
SELECT *
INTO #prodline
FROM (
SELECT prodline = '####' UNION ALL
SELECT '100' UNION ALL
SELECT '101' UNION ALL
SELECT '3M' UNION ALL
SELECT '80NIPA' UNION ALL
SELECT...
October 17, 2011 at 6:47 am
Comment out the index hint!
FROM orderlines ol -- with (index(Ix_Prodline)) <<-- keep this out of the query!!
October 17, 2011 at 6:43 am
Take the index hint out of the query. Index hints are very rarely used because the optimiser will almost always choose the best index for the job. In this case,...
October 17, 2011 at 5:47 am
adlakha.22 (10/17/2011)
Now Query is Grouped By, 5 columns and it took 60 sec to execute complete join Query.
As u suggest i have created index with columns in...
October 17, 2011 at 5:02 am
Another method 3x faster than original stoned snail CROSS APPLY:
SELECT t.id, t.v1, t.v2, t.v3, t.v4, t.v5, t.v6, x.ColIndex
FROM @Tab1 t
CROSS APPLY (
SELECT rn = ROW_NUMBER() OVER (ORDER BY v),...
October 17, 2011 at 3:52 am
adlakha.22 (10/17/2011)
"to establish which if any can be dispensed with by using MAX() around the column in the output list, whilst retaining the original...
October 17, 2011 at 3:12 am
Gianluca Sartori (10/17/2011)
Cadavre (10/17/2011)
Gianluca Sartori (10/14/2011)
I couldn't resist!Me either 😀
I already knew it was slow, but it was such a fun problem!
It's something you don't stumble upon very often.
As I...
October 17, 2011 at 2:55 am
No problem, it's worth testing to see the results. Try trimming the columns from the GROUP BY one at a time to establish which if any can be dispensed with...
October 17, 2011 at 2:09 am
Cadavre (10/17/2011)
Gianluca Sartori (10/14/2011)
I couldn't resist!
Me either 😀
========== BASELINE ==========
SQL Server Execution Times:
CPU time = 203 ms, elapsed time = 205 ms.
================================================================================
========== CROSS JOIN ==========
...
October 17, 2011 at 1:59 am
Viewing 15 posts - 6,586 through 6,600 (of 10,144 total)