Viewing 15 posts - 466 through 480 (of 582 total)
I can't see a reason. I assume none of the columns referenced are indeterministic computed or view columns? Any float (imprecise) data? - I'm clutching at straws now...
Tim Wilkinson
"If it doesn't work in practice, you're using the wrong theory"
- Immanuel Kant
May 24, 2006 at 7:25 am
It's quite a big topic. Here's a basic answer to your question.
You can view query plans in teh graphical viewer in QA, or as text in the results window/profiler/etc.
In the graphical...
Tim Wilkinson
"If it doesn't work in practice, you're using the wrong theory"
- Immanuel Kant
May 24, 2006 at 6:56 am
Or:
t1.vc_col, V.stub
Tim Wilkinson "If it doesn't work in practice, you're using the wrong theory"
- Immanuel Kant
May 24, 2006 at 6:35 am
Based on the sample data from one of the above examples, this is a rough-and-ready outline of teh kind of code you could use. Obviously needs tidying up, but you...
Tim Wilkinson
"If it doesn't work in practice, you're using the wrong theory"
- Immanuel Kant
May 24, 2006 at 6:12 am
Your explanation makes school and site sound like effectively the same thing, but earlier you said they weren't. Post the DDL for your tables.
Tim Wilkinson
"If it doesn't work in practice, you're using the wrong theory"
- Immanuel Kant
May 24, 2006 at 5:38 am
Don't use a cursor. The tables you mention don't provide enough information to achieve the result you want. Analysis:
Tim Wilkinson
"If it doesn't work in practice, you're using the wrong theory"
- Immanuel Kant
May 24, 2006 at 5:17 am
How about putting this code in a trigger or sp to run when the db list is updated:
@sql nvarchar(4000) Tim Wilkinson "If it doesn't work in practice, you're using the wrong theory"
- Immanuel Kant
May 23, 2006 at 9:11 pm
Schedule it to run off-peak, if you have a peak. You might want to look at partitioning your table. How come you are deleting so much data? Are you archiving...
Tim Wilkinson
"If it doesn't work in practice, you're using the wrong theory"
- Immanuel Kant
May 23, 2006 at 8:36 pm
One would need to know how 'site' relates to 'school'. The DDL would help. A hint: you might want to try using a left (outer) join to exclude certain records.
Tim Wilkinson
"If it doesn't work in practice, you're using the wrong theory"
- Immanuel Kant
May 23, 2006 at 8:23 pm
from positions_table pt
from old_table ot)
Tim Wilkinson
"If it doesn't work in practice, you're using the wrong theory"
- Immanuel Kant
May 23, 2006 at 7:40 pm
You will need to be sure that you can treat position_name in the positions_table as unique.
The least stringent check you can make, in case it's of any use:
from old_table ot
Tim Wilkinson
"If it doesn't work in practice, you're using the wrong theory"
- Immanuel Kant
May 23, 2006 at 7:38 pm
Tim Wilkinson
"If it doesn't work in practice, you're using the wrong theory"
- Immanuel Kant
May 23, 2006 at 7:26 pm
I half-changed it from...
Tim Wilkinson
"If it doesn't work in practice, you're using the wrong theory"
- Immanuel Kant
May 23, 2006 at 7:25 pm
as a short-term fix (until you implement the above recommendation, perhaps with a table holding yearid, monthid, your float value and a FK back to the original table), you can...
Tim Wilkinson
"If it doesn't work in practice, you're using the wrong theory"
- Immanuel Kant
May 23, 2006 at 7:24 pm
Sorry my mistake. That was a reconstruction of what we think the original code could have looked like?
Tim Wilkinson
"If it doesn't work in practice, you're using the wrong theory"
- Immanuel Kant
May 23, 2006 at 7:09 pm
Viewing 15 posts - 466 through 480 (of 582 total)