MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

DB2 VIEW when the data gets loaded?

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Database
View previous topic :: View next topic  
Author Message
EugeneE
Beginner


Joined: 24 Apr 2005
Posts: 8
Topics: 3

PostPosted: Sun Apr 24, 2005 11:45 am    Post subject: DB2 VIEW when the data gets loaded? Reply with quote

Hi,

Our application interactively executes a complex SELECT from DB2 (v 7.1). Execution takes about 1 min.

I am thinking of creating a VIEW, based on this select and execute select * from thic VIEW. I do not understand how VIEW is working. Will the original select be executed every time when I obtain data from the VIEW? Or the VIEW will be updated when the data in the original tables was updated?

The original tables are updated in batch, so if the VIEW will be updated in the same time, the interactive execution will be fast.

Can somebody help me out please?

Thank you
Back to top
View user's profile Send private message
s_shivaraj
Beginner


Joined: 21 Sep 2004
Posts: 140
Topics: 14
Location: Chennai, India

PostPosted: Sun Apr 24, 2005 11:54 pm    Post subject: Reply with quote

EugeneE,

I didnt think your execution time will reduce because of creating a VIEW, because your query is executed every time over the table even when u create a VIEW and VIEW wouldnt store the query results seperately anywere.

Quote:
Will the original select be executed every time when I obtain data from the VIEW?
Yes, It always queries the Table for ur VIEW results .
_________________
Cheers
Sivaraj S

'Technical Skill is the Master of complexity, while Creativity is the Master of Simplicity'
Back to top
View user's profile Send private message AIM Address
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12378
Topics: 75
Location: San Jose

PostPosted: Mon Apr 25, 2005 7:51 am    Post subject: Reply with quote

EugeneE,


Please check this link which explains in detail about Views

http://publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/DSNSQH10/1.12?DT=20010215120247

Hope this helps...

Cheers

Kolusu
_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
EugeneE
Beginner


Joined: 24 Apr 2005
Posts: 8
Topics: 3

PostPosted: Mon Apr 25, 2005 7:47 pm    Post subject: DB2 VIEW when the data gets loaded? Reply with quote

Thank you very much, now it is clear.

Does mainframe DB2 have something like materialized queries or anything else to populate at batch time?

Thank you
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12378
Topics: 75
Location: San Jose

PostPosted: Tue Apr 26, 2005 7:37 am    Post subject: Reply with quote

Quote:

Does mainframe DB2 have something like materialized queries or anything else to populate at batch time?

EugeneE,

What exactly do you mean by "materialized queries "?

Kolusu
_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
CZerfas
Intermediate


Joined: 31 Jan 2003
Posts: 211
Topics: 8

PostPosted: Wed Apr 27, 2005 5:33 am    Post subject: Reply with quote

In DB2 version 8 (on z/OS) you will have MQTs (materialized query tables), which will perform as you asked. There population can be triggered via the new REFRESH TABLE statement.

regards
Christian
Back to top
View user's profile Send private message
EugeneE
Beginner


Joined: 24 Apr 2005
Posts: 8
Topics: 3

PostPosted: Wed Apr 27, 2005 6:45 pm    Post subject: DB2 VIEW when the data gets loaded? Reply with quote

Thank you Christian, will wait for version 8
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Database All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group