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 > Processing of Views in DB2

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 08-11-04, 05:17
Beegee Beegee is offline
Registered User
 
Join Date: Jul 2004
Posts: 5
Processing of Views in DB2

Hello everybody,

I have a question concerning views in DB2.

In our current performance tuning efforts, we noticed in some Application logs, that fetching rows from a result set which involves a view is significantly slow. Also, we have severe problems with memory consumption of our database.

Therefore my question: How are views processed by the database? My impression is that views are handled like normal subselects, but and the SQL is just rewritten by the query optimizer, so that the "view expression" is more or less replaced by the select which implements the view.
(I know that the optimizer does further rewrites of the query, if it improves the performance).
Thus, there should be no overhead like caching of rows for the view, which impacts the usage of buffer pools, package cache or the like.

Is this correct? If so, what might be the reason for the long fetch times?

Greetings, Ruediger.
Reply With Quote
  #2 (permalink)  
Old 08-11-04, 14:30
sathyaram_s sathyaram_s is offline
Super Moderator
 
Join Date: Aug 2001
Location: UK
Posts: 4,534
Google-ing for db2 "view materialization" I got the following useful links (There are many more)

http://publib.boulder.ibm.com/html/a...rzajqmst42.htm

http://www.quest-pipelines.com/pipel...ps03.htm#april

HTH

Sathyaram
__________________
Visit the new-look IDUG Website , register to gain access to the excellent content.
Reply With Quote
  #3 (permalink)  
Old 08-11-04, 15:20
Beegee Beegee is offline
Registered User
 
Join Date: Jul 2004
Posts: 5
Hello Sathyaram,

thanks for the links. Even after browsing the DB2 PDF documentation for several hours, I was rather clueless. Now I have some keywords to start with and some general hints, which will greatly reduce the effort.

Greetings, Ruediger.
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