my function needs to execute 3 queries. is it faster to execute 3 queries
seperately or make a combine query?
update query
execute
update query
execute
insert query
execute
OR
update query;update query;insert query
execute>> is it faster to execute 3 queries seperately or make a combine query?
There is no such heuristic; it depends on what each of the DML statements
do, the indexes involved, the magnitude of the underlying datasets etc. Test
it out both ways are find it out yourself.
Anith|||First of all, your pseudo-code has NO queries at all! UPDATE and
INSERT INTO are statements; they change data. Queries do not change
data. Next, what the heck is EXECUTE? that calls a procedure in
T_SQL.
Finally, who knows? You gave no code to look at, hint about any
relationship that need to be maintained, etc. Can uyou explain what you
meant?
Tuesday, March 20, 2012
queries
Labels:
combine,
database,
execute,
function,
microsoft,
mysql,
oracle,
queries,
queriesseperately,
queryexecuteupdate,
queryupdate,
server,
sql
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment