store procedures or materialized view and why?

Certified Senior Developer

I encounter with the question "join performs on 3 table and each table has many rows and queries, it returns many responses". live data not required and 2 hours refresh allowed?? which option we use and why?? options:--store procedures or materialized view

  Discussion posts and replies are publicly visible

Parents
  • Both will work. But the advantage of a materialized view is that the joins/selections have been pre-executed and all your application needs to request is a read of the data. If you went the stored procedure route the database engine would have to conduct the joins/selects in real-time. If the volume of data was very large then this would impact the performance of any given query.

Reply
  • Both will work. But the advantage of a materialized view is that the joins/selections have been pre-executed and all your application needs to request is a read of the data. If you went the stored procedure route the database engine would have to conduct the joins/selects in real-time. If the volume of data was very large then this would impact the performance of any given query.

Children