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

9y
1.9k
1
Reply

    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

    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.