• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Performance considerations on Views

 
Ramesh Donnipadu
Ranch Hand
Posts: 100
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Are there any performance penalties that we need to consider before creating views? If we create a view by joining several tables, does inserts/updates to the tables underlying the view take longer?
Thanks for any help,
Ramesh
 
steve souza
Ranch Hand
Posts: 862
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The only performance problems with views are the same that apply for any SQL. You must create the proper indexes. Updates to the underlying tables should take no longer.
 
Loren Rosen
Ranch Hand
Posts: 156
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I suppose there's some overhead to decide if your update is supported by the database. But this is probably not large and in any case should only be incurred once (at least if you use prepared statements).
Beyond that, I would take a careful look at the execution plan for the update. Sometimes operations on views can expose optimizer quirks.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic