Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 Changing query in a SP

Author  Topic 

saglamtimur
Yak Posting Veteran

91 Posts

Posted - 2003-09-18 : 15:26:39
I have a SP that I need to change the query in that sp with a new one. I cannot create a new proc with a new name and new query, because this sp is used by a application that has 400 copies installed. So I need to know if this effects my SP performance? ( As I know each sp has an execution plan, if I change query, will execution plan change aswell?). What is my solution is dropping old SP, and recreating it with old name and with new query.

Any better ideas?

Thanks in advance.

airjrdn
Starting Member

35 Posts

Posted - 2003-09-18 : 15:50:03
I guess I'm not understanding exactly what you are referring to when you are saying DML.

Could you explain?
Go to Top of Page

nr
SQLTeam MVY

12543 Posts

Posted - 2003-09-18 : 17:56:28
The SP is executing the query.
Create a script to drop the SP and create it again (see scripting in enterprise manager for the format).
Change the query.
Run the script.
The next time the SP is called (you should do a test immediately) it will create the query plan and you will be OK.

==========================================
Cursors are useful if you don't know sql.
DTS can be used in a similar way.
Beer is not cold and it isn't fizzy.
Go to Top of Page

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2003-09-18 : 17:58:28
Dropping and recreating is the solution to go with.

I don't see DML mentioned in the post, but maybe it was deleted when the post was edited. But DML stands for data manipulation language, which are your inserts, updates, deletes.

Tara
Go to Top of Page

saglamtimur
Yak Posting Veteran

91 Posts

Posted - 2003-09-19 : 07:11:42
Thanks.

And Tara, yes I edited my post and change DML=query. .
Go to Top of Page
   

- Advertisement -