0

How to get the size(in bytes) of the given ResultSet within the java code. Is there any direct way to find out?

2 Answers 2

1

Hm, I'm not even sure there is a well-defined answer. A ResultSet is just an abstraction for a database concept (usually it wraps a DB cursor). What is the size even supposed to be? The total amount of data fetched by the last query? Do you want the amount of bytes sent over the network? The amount of memory needed to store the results?

I think you should go back a step and tell us what your underlying requirement is. Then you might actually get an answer :-).

Sign up to request clarification or add additional context in comments.

1 Comment

I want the amount of memory that is used to store the results in the ResultSet object.
0

You will need to use a network stack monitoring tool to intercept and record the network packets sent and received between your application and the database.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.