adspace


What is the diff between Dynamic queries and static queries

Answer Posted / jerry joseph

Static query will be executed as it is.

Dynamic query is built upon conditions depending upon the
parameters.

Static query will create an execution plan during compilation.

Dynamic query will create execution plan at run time.
Its very slow in execution since building the plan at run
time makes it too slow.

Is This Answer Correct ?    17 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Does view occupy space?

1031


Is there any performance difference between if exists (select null from table) and if exists (select 1 from table)?

1031


Can sql servers link to other servers like oracle?

928


Can we make the the chages By Using the Sql if u know any function or process please inform me Actuall result: BRK1 Break 1 Part 1 00:01:00:00 60 BRK1 Break 1 Part 2 00:01:00:00 60 BRK2 Break 2 Part 1 00:01:00:00 60 BRK2 Break 2 Part 2 00:01:00:00 60 BRK2 Break 2 Part 3 00:01:00:00 60 BRK3 Break 3 Part 1 00:01:00:00 60 BRK3 Break 3 Part 2 00:01:00:00 60 Desired O/P: BRK1 Break 1 Part 1 00:01:00:00 60 Part 2 00:01:00:00 60 BRK2 Break 2 Part 1 00:01:00:00 60 Part 2 00:01:00:00 60 Part 3 00:01:00:00 60

2300


What are the pros and cons of putting a scalar function in a queries select list or in the where clause?

1303


What are the risks of storing a hibernate-managed object in a cache? How do you overcome the problems?

1209


What is a scheduled job or what is a scheduled task?

1043


What is the difference between for xml raw and for xml auto?

1125


What is the primary use of the model database?

1156


What is subquery? Explain the properties of a subquery?

1070


Can we do dml on views?

1041


What is an indexed view?

1029


How can you append an identity column to a temporary table?

1076


Explain system functions or built-in functions? What are different types of system functions?

1069


explain different types of backups avaialabe in sql server? Given a particular scenario, how would you go about choosing a backup plan? : Sql server database administration

1139