Viewing 15 posts - 541 through 555 (of 18,926 total)
crookj (12/7/2011)
WOTD = mutenessThis thread has gone silent!
Shhhht! :hehe:
December 7, 2011 at 8:43 am
GilaMonster (12/7/2011)
Dev (12/7/2011)
Optimizer can create statistics on columns. Uses actual row count for generation execution plan.
Estimated row count, not actual. The optimiser doesn't go off and count the...
December 7, 2011 at 6:47 am
Dev (12/7/2011)
Ninja's_RGR'us (12/7/2011)
Dev (12/7/2011)
The only point of argument is the table is toooooo small i.e. 2 rows....
December 7, 2011 at 6:44 am
You're missing a lot of double quotes.
What I do to make this work is take the working query in ssms, shoot it to notepad and replace ' WITH ''. ...
December 7, 2011 at 6:43 am
What do you mean by reduce??
Do the query return anything if you take out all the filters? If so add then 1 by one untill you find the one...
December 7, 2011 at 6:40 am
Dev (12/7/2011)
The only point of argument is the table is toooooo small i.e. 2 rows. I am not a...
December 7, 2011 at 6:36 am
GilaMonster (12/7/2011)
Ninja's_RGR'us (12/7/2011)
Dev (12/7/2011)
And that's precisely my point. Plus, it can cache complete table in memory.As I already said before this myth to effing die!
http://www.sqlservercentral.com/articles/Temporary+Tables/66720/
I wish it would...
December 7, 2011 at 6:28 am
Dev (12/7/2011)
And that's precisely my point. Plus, it can cache complete table in memory.
As I already said before this myth to effing die!
http://www.sqlservercentral.com/articles/Temporary+Tables/66720/
December 7, 2011 at 6:23 am
anthony.green (12/7/2011)
UNION ALL does give duplicates, if you dont want duplicates use UNION
And be prepared for a hell of a performance hit with any significant amount of data.
December 7, 2011 at 6:22 am
Query direct on 1 table or 1 view?
If theview is complex enough, it might take 4 sec to really simplify it enough to run the query.
Can you post the actual...
December 7, 2011 at 6:09 am
Dev (12/7/2011)
Ninja's_RGR'us (12/7/2011)
Dev (12/7/2011)
Ninja's_RGR'us (12/7/2011)
WHERE Items.ItemCategoryCode IN (SELECT CategoryCode FROM @Cats)
Convert to #tbl with PK to help the stats, search and replace to find the 5-10...
December 7, 2011 at 6:06 am
Any reason you're doing 3 selects here? I've only skimmed the queries but they look extremely similar!
December 7, 2011 at 6:04 am
You can order by only AFTER the unions <all>.
& reformatted for my sanity.
SELECT
ROW_NUMBER() OVER ( ORDER BY a.CollegeName ) + 1 as SrNo
, a.[CollegeId]
...
December 7, 2011 at 6:02 am
Dev (12/7/2011)
Ninja's_RGR'us (12/7/2011)
WHERE Items.ItemCategoryCode IN (SELECT CategoryCode FROM @Cats)
Convert to #tbl with PK to help the stats, search and replace to find the 5-10 occurances and boom, 98%...
December 7, 2011 at 5:58 am
I'd trust Gail with my life if I needed to (especially in sql).
This seems like a very small step compared to that :-D.
December 7, 2011 at 5:49 am
Viewing 15 posts - 541 through 555 (of 18,926 total)