If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > DB2 > Query Result Output Size - Snapshot

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 09-02-08, 13:31
DB2USER99 DB2USER99 is offline
Registered User
 
Join Date: Sep 2007
Posts: 10
Query Result Output Size - Snapshot

Hello Everyone,

I need some help in determining the size (in mb,kb/gb) of the resultant output of a query in DB2.The Snapshot returns the number of rows read and written, is there a similar way I can get the size of the returned result in bytes.

Thanks in Advance,
Reply With Quote
  #2 (permalink)  
Old 09-02-08, 14:27
ARWinner ARWinner is offline
Registered User
 
Join Date: Jan 2003
Posts: 3,575
I do not think so.

Andy
Reply With Quote
  #3 (permalink)  
Old 09-03-08, 03:57
stolze stolze is offline
Registered User
 
Join Date: Jan 2007
Location: Jena, Germany
Posts: 2,662
I am wondering: What would you want to do with such a number?

It would be wrong anyway. The number of bytes read from disk is different due to the overhead of page headers and other data on pages. The number of bytes send over the network may be different too if you have some sort of compression or encryption in between.
__________________
Knut Stolze
IBM DB2 Analytics Accelerator
IBM Germany Research & Development
Reply With Quote
  #4 (permalink)  
Old 09-03-08, 09:34
DB2USER99 DB2USER99 is offline
Registered User
 
Join Date: Sep 2007
Posts: 10
Thanks Stolze,

I had received a request where they wanted all the queries which returned results of different sizes.
I had thought of the option where we could multiply the record counts to the average size of the row we get from a snapshot. But this would not be easy with a query touching many tables and in a very short duration of time.

Thanks,
Reply With Quote
  #5 (permalink)  
Old 09-03-08, 10:12
stolze stolze is offline
Registered User
 
Join Date: Jan 2007
Location: Jena, Germany
Posts: 2,662
Typically, such requests mean that the queries should have different selectivity and return a differing number of rows.
__________________
Knut Stolze
IBM DB2 Analytics Accelerator
IBM Germany Research & Development
Reply With Quote
  #6 (permalink)  
Old 09-03-08, 16:12
DB2USER99 DB2USER99 is offline
Registered User
 
Join Date: Sep 2007
Posts: 10
Quote:
Originally Posted by stolze
Typically, such requests mean that the queries should have different selectivity and return a differing number of rows.
Stolze,

Do we have a way which will return this information.I agree the number of rows differ and I was looking for a similar output as a snapshot provides rows written.

Is there a limit on the data a snapshot returns and what is the value it depends on.Will it be able to return queries executed for a period of n days where the number of queries executed are in thousands and the size of queries is large.Currently I am running a snapshot every 30 mins so that I do not miss any query.

Thanks in Advance,
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On