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 > Ways to identify tempspace usage from access plan

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 10-24-11, 20:08
db2girl db2girl is offline
∞∞∞∞∞∞
 
Join Date: Aug 2008
Location: Toronto, Canada
Posts: 1,816
Ways to identify tempspace usage from access plan

The way I know is to look at SORT and TBSCAN above it and see if there is an increase in I/O.

How else can I tell if the optimizer may need to use tempspace?


Lots of tempspace is being used during query execution (static sql) and the access plan I have doesn't show any sort spills. Still need to get an explain for the query that is stored in the package (explain I have is for the same query that is stored in the package, but the query was run dynamically when db2exfmt was created). The only join method used is NLJOIN (no HSJOIN).
Reply With Quote
  #2 (permalink)  
Old 10-25-11, 06:12
db2girl db2girl is offline
∞∞∞∞∞∞
 
Join Date: Aug 2008
Location: Toronto, Canada
Posts: 1,816
I have the package name / section # so I'll get the access plan stored in the package and compare to the one generated when it's run dynamically. The sql is filling up 170GB tempspace filesystem during execution... I'll confirm and recheck everything, but I definetely see it's spilling to disk. If you know of a way to identify tempspace usage from the access plan (other then SORT - TBSCAN), please let me know.
Reply With Quote
  #3 (permalink)  
Old 10-25-11, 09:04
n_i n_i is offline
:-)
 
Join Date: Jun 2003
Location: Toronto, Canada
Posts: 4,449
There are a lot of things that can spill beside sorts (e.g. HSJOIN), but I doubt you'll see it in the plan because the query compiler does not care about that - I think it's the interpreter that handles overflows. In other words, there's no information about the temp space use during compilation, only during execution.
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