|
Home > Archive > microsoft.public.cert.exam.mcsd > April 2004 > 70-229 exam related questions
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
70-229 exam related questions
|
|
| Session 2004-04-29, 6:33 pm |
| Hello,
I have used SQL multiple times in the past just to
maintain relatively simple databases. I purchased and
read microsoft press's review book for the 70-229 exam,
and there are many things on the exam (which I failed by 3
questions) which are not covered in the book. Could
anyone shed some light on the following:
- What should be used when querries to a database need to
merge multiple tables with joins: a view, a stored
procedure, or a user defined function?
- If some stored procedures (but not all) are working more
slowly than before, what should be done to improve their
performance: call UPDATE STATISTICS or use DBCC REINDEX
with the tables called in the slow stored procedures.
- Can someone give me an overview of the major differences
between stored procedures and user defined functions,
besides the fact that a stored procedure can't be used
within a SELECT query clause? what are the advantages of
a user defined function?
- Does the order of tables in a join statement affect the
optimizer's choice of an execution plan?
- If we have a table with a great deal of rows (2 million
or more), what is the best solution to improve performance
with parralel IO access: add indexes on the table, or
split the table horizontally and use a view to access all
of the data?
Thank you for the help.
Session
| |
| Brad Williams 2004-04-29, 6:33 pm |
|
"Session" <semwamufiya@alum.vassar.edu> wrote in message
news:626801c42e0d$e6c92150$a00
1280a@phx.gbl...
> - Can someone give me an overview of the major differences
> between stored procedures and user defined functions,
> besides the fact that a stored procedure can't be used
> within a SELECT query clause? what are the advantages of
> a user defined function?
They aren't similar enough that you can say one has advantages over the
other: they get used in different situations for different purposes.
udf can act as a "virtual table" for other TSQL code, sp cannot.
udf can act as a computed scalar value (afterall, it's a function!) in other
TSQL code, sp cannot.
sp can insert and update tabel data, udf cannot (it's merely a function *of*
other stuff)
sp can do DDL, udf cannot.
Brad Williams
|
|
|
|
|