2
Reply

There are two stored procedures with same set of sql statements. Name of first stored proc is GetEmployee and other is SP_GetEmployee. Which procedure will execute faster?

Vineet Kumar

Vineet Kumar

Mar 12, 2015
1.8k
1

    GetEmployee will execute faster than SP_GetEmployee Reason :- Whenever we execute a proc with name having sp_ as prefix, sql server first scans the system procedures. If it does not find the proc in system procedures than it scans the user defined procedures. Hence it takes more time to scan the proc

    Vineet Kumar
    March 12, 2015
    2

    GetEmployee. because all the system procedure are prefixed with SP_ so when we give a procedure name sp_ SQL server searches for system stored procedure which is time consuming in terms of milliseconds but it is.

    Vishal Jadav
    August 08, 2016
    1