How do i obtain the size in bytes from the data came back in the database when performing a question? The reason behind this really is to check strain on the database server using two different techniques. I was running reviews constructed from exactly the same dataset which may load the whole dataset for each report. Now we're caching the dataset and running reviews in the cache. We run reviews per client, some datasets are considerably larger than others, and that i take some method to provide a measurable metric for that database server load reduction.
I've attempted searching through DbConnection, DbDataReader and DbCommand for just about any existing functionality, but was not able to locate it. It is always good to appraise the data throughput of the given connection or readers if at all possible, but any solutions are acceptable. Can there be possibly a database server proxy I'm able to use to measure it?
The database is Oracle 10g.
One possibility is always to simply employ a network sniffer. Wireshark is very good. It might be tricky to measure by connection (when utilizing multiple connections on the given machine), but you could utilize it to measure all of the traffic back and forth from a customer machine. Just one benefit of the is it would also measure outgoing demands, that ought to be small inside your situation (report generation) but they are still an element of the overall load.
Another advantage of calculating it by doing this is it would find variations (if you will find any) in how big demands being made. For instance, if a person method triggered individual records to become read in the server in separate demands and also the other method triggered a "batch" of records to become read in a single request, you would then have the ability to see individuals variations. Both techniques within this situation might reveal that the entire data in the DbDataReader level is identical, however the first method would lead to considerably more network traffic.
Wireshark shows lots of statistics that may be helpful with this. It may give final amount of packets, average size packets, total size, average bytes per second, etc.
Perhaps you have attempted calculating it around the database side? Oracle 10g seems have a whole stack of performance tuning and monitoring tools.
you cannot get size result set except of looping throughout it. if you cannot afford it from preformace perspective you are able to return size result set from server in first row of result set. or return two result sets.
I do not think there's any smart way to do this. To be able to obtain the metadata, you actually need the information to become symbolized as DataSet or DataTable not with the DbDataReader or DataRow to ensure that all secrets, posts and metadata are symbolized in general.
Things I is going to do is to produce a binary formatter and memorystream and serialize the DataSet/DataTable in to the memorystream as binary data. Next have the ability to request for that length in the stream. This will quite precisely informs you about how big the information as published in your question
This really is most likely a performance killer to simply want to utilize it in debugging atmosphere only to learn about how big your computer data