Viewing 15 posts - 1,771 through 1,785 (of 18,926 total)
AccidentalDBA:) (10/22/2011)
October 22, 2011 at 11:48 am
NNNNNNNNNNNNNOOOOOOOOOOOOOOOOOO
The correct way is simply this
IF OBJECT_ID('temdb..#tblname', 'U') > 0
DROP TABLE #tblname
The short answer is that you use a @table variable only when you...
October 22, 2011 at 11:32 am
#5 on the +1.
This is my setup as well. I actually have 4 full backups running exactly at the same time + a log backup (all kicking off extactly...
October 21, 2011 at 3:32 pm
Grant Fritchey (10/21/2011)
Jack Corbett (10/20/2011)
On a more serious note, I'd like to put together a new presentation, but I'm a bit short on ideas. Any suggestions?
Throw out an old...
October 21, 2011 at 11:45 am
No I'm in Canada.
I live in a small city and consult in a big one so I get lower living costs (actually more for the same money) with higher consulting...
October 21, 2011 at 11:42 am
Any issue with the network?
that would either break the application or slow down the network. With the 2nd option reallllllllllly unlikely unless you're talking about GB of prints per...
October 21, 2011 at 9:31 am
GilaMonster (10/21/2011)
Loner (10/21/2011)
I usedselect *
from @table
INNER JOIN table1
INNER JOIN table2
WHERE...
That's just about guaranteed to produce a sub-optimal execution plan. One of the senior devs on the Query Optimiser team explicitly...
October 21, 2011 at 9:30 am
I'm definitely higher end than avg but I don't even look at a job under 100K.
October 21, 2011 at 9:19 am
Loner (10/21/2011)
I usedselect *
from @table
INNER JOIN table1
INNER JOIN table2
WHERE...
Yes that's one of the bad ways to use it.
#temp is definitely the way to go here unless you are debuging and...
October 21, 2011 at 9:17 am
Loner (10/21/2011)
Here is the parameter plan.Yes, the parameter is coming in as comma delimited.
We need the ACTUAL plan, this is estimated.
We need it for both good & bad executions.
October 21, 2011 at 9:15 am
GilaMonster (10/21/2011)
Table variables and large amounts of data? Hell yes that's a problem unless all you're doing is a direct select from the table variable, no joins, no filters.
My guess...
October 21, 2011 at 9:13 am
Ninja's_RGR'us (10/21/2011)
Ninja's_RGR'us (10/21/2011)
Please post the good & bad actual execution plan.
October 21, 2011 at 9:10 am
Stefan Krzywicki (10/21/2011)
Sure enough, that's what the software was trying to do. I told them this doesn't work in SQL Server 2008 and I haven't heard back since.
October 21, 2011 at 9:09 am
You might try a double exec :
EXEC('USE whatever;
EXEC(''disable here'')
')
Edit 1 : I might have misunderstood the using syntax you were talking about!
Edit 2 : Gail's syntax will work after...
October 21, 2011 at 9:03 am
Loner (10/21/2011)
I also used table variables to store large amount of data, would it be the problem.How do I post the execution plan?
1
Save it as .sqlplan then when you post...
October 21, 2011 at 9:02 am
Viewing 15 posts - 1,771 through 1,785 (of 18,926 total)