jQuery in Action, 3rd edition
The moose likes JDBC and Relational Databases and the fly likes Performance considerations on Views Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC and Relational Databases
Bookmark "Performance considerations on Views" Watch "Performance considerations on Views" New topic

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,
steve souza
Ranch Hand

Joined: Jun 26, 2002
Posts: 862
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
It's not a secret anymore!