• Post Reply Bookmark Topic Watch Topic
  • New Topic

Will it be better to convert Stored Procedures....  RSS feed

 
Anonymous
Ranch Hand
Posts: 18944
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Dear Friends,
I found that it will be better to convert stored procedures to EJB and use EJB an effectively on legacy systems.
I am doubtful about the response of a database to such situation.
Any one who is experienced will sugest me about performance of this type of situation?
Regards
Jaisinh
 
Matt Midcap
Sheriff
Posts: 440
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Jaisinh,
I do stored procedures a lot and the performance is good. What are your particular concerns?
Best Regards,
Matt
 
sandy gupta
Ranch Hand
Posts: 228
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Well friend,
The difference is there and that is why it is good to migrate your stored procedures to the EJB/Java's JDBC. See if you have a number of stored procedures the overheads involved are the connection to the DB which even matt would agree is considerable and then in case you want to call one stored procedure from another.........
But in EJB's you get a connection pool at the time of server startup so efffectively no time in connecting to the database and what your stored procedure will do inside the Oracle server, you can do sitting in the comfort of u'r app server...
 
Peter den Haan
author
Ranch Hand
Posts: 3252
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by sandy ind:
[...] See if you have a number of stored procedures the overheads involved are the connection to the DB which even matt would agree is considerable and then in case you want to call one stored procedure from another.........

Um, Sandy, you've got the wrong end of the stick here. Stored procedures have been optimised for database performance. That's why they exist in the first place. If you need to pump lots of data around the database, there's no more performant way to do so than a stored procedure.
The languages used to write stored procedures in (such as PL/SQL) are geared towards database access and will connect to and interface with the database very efficiently.
Even if you would choose write your stored procedures in Java, a good database vendor (including Oracle) will give you a special server-side JDBC driver that hooks straight into the database core. No network involved, a lot faster than a run of the mill JDBC connection, but still slower than PL/SQL (read theOracle Application Developer's Guide).
- Peter
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!