Home » SQL & PL/SQL » SQL & PL/SQL » Calling View better or calling Procedure?
Calling View better or calling Procedure? [message #7709] Wed, 02 July 2003 09:20 Go to next message
pink
Messages: 23
Registered: July 2003
Junior Member
I wanted to know which method would be better.

Since I have to display a page with a lot of informaiton pulled from several different tables using JSP and JDBC , I was wondering if it was better to create a view that displayed that information or would it be better to use a stored procedure...

Which 1) View or 2) Procedure would be faster?
Re: Calling View better or calling Procedure? [message #7717 is a reply to message #7709] Wed, 02 July 2003 20:04 Go to previous message
Mahesh Rajendran
Messages: 10707
Registered: March 2002
Location: oracleDocoVille
Senior Member
Account Moderator
both are for different purposes.
a view is to hide the complexity of the sql statement.
everytime u query the view, the base sql on which the view is  built,
it issued...in simple word, view will not help in performance.

A stored procedure is one used again to hide the direct-sql against the database and it is a bit faster.
Becuase it does parse the sql again and again. Instead, it parses once and use the pcode the next time.
if u dont want to issue the complex sql within the procedure ( to reduce code??) create a view and use it inside a stored procedure....

Previous Topic: Table getting outer joined twice
Next Topic: rebuilding index, secondary temporary table
Goto Forum:
  


Current Time: Thu Apr 25 18:44:40 CDT 2024