Which is faster ? View or Stored procrdeure

Muditha Bandara 21 Reputation points
2020-11-07T13:12:04.297+00:00

Let's say we have we simple query to get data from a table.

select firstname from Customer

We have a View with this query and stored procedure .

Which is faster and why ?

SQL Server
SQL Server
A family of Microsoft relational database management and analysis systems for e-commerce, line-of-business, and data warehousing solutions.
13,788 questions
Transact-SQL
Transact-SQL
A Microsoft extension to the ANSI SQL language that includes procedural programming, local variables, and various support functions.
4,637 questions
0 comments No comments
{count} votes

Accepted answer
  1. Dan Guzman 9,236 Reputation points
    2020-11-07T14:20:59.28+00:00

    I would expect identical performance with either a view or stored procedure because the query execution plans will likely be the same. Views and procedures are different from a functionality perspective, though, so you may see differences in performance for more complex scenarios but I wouldn't generalize one will be faster than the other.

    0 comments No comments

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.