File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JDBC and the fly likes Performance considerations on Views Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "Performance considerations on Views" Watch "Performance considerations on Views" New topic
Author

Performance considerations on Views

Ramesh Donnipadu
Ranch Hand

Joined: Sep 16, 2000
Posts: 100
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

Joined: Jun 26, 2002
Posts: 861
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.


http://www.jamonapi.com/ - a fast, free open source performance tuning api.
JavaRanch Performance FAQ
Loren Rosen
Ranch Hand

Joined: Feb 12, 2003
Posts: 156
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.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Performance considerations on Views