views:

117

answers:

2

Using PL/SQL, what are good options for sending large amounts of data to client side code?

To elaborate, server side PL/SQL operates on a request and generates a response with a large amount of data that must be sent to the client side code. Are there "good options" for sending down large amounts of data? What types of Oracle pros/cons are important to consider here?

A: 

there are no good options, always try to send the smallest amount of data to the client. your database and network will thanks you!

if you can send small chunks spread over time, that would be better that dumping everything at once.

KM
+1  A: 

The two problems you have when you want to return large amounts of data are:

  • bandwidth issues
  • memory issues (both at the server and the client)

If in any way possible, you should attempt to stream the data instead of returning it all at once. You will occupy the same bandwidth but there is less peak usage and you prevent memory issues (at least at the server, it depends on your client implementation how memory is used over there).

Oracle provides streaming support through pipelined functions. You can find examples here and here.

Ronald Wildenberg