View previous topic :: View next topic |
Author |
Message |
EugeneE Beginner
Joined: 24 Apr 2005 Posts: 8 Topics: 3
|
Posted: Sun Apr 24, 2005 11:45 am Post subject: DB2 VIEW when the data gets loaded? |
|
|
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 |
|
 |
s_shivaraj Beginner

Joined: 21 Sep 2004 Posts: 140 Topics: 14 Location: Chennai, India
|
Posted: Sun Apr 24, 2005 11:54 pm Post subject: |
|
|
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 |
|
 |
kolusu Site Admin

Joined: 26 Nov 2002 Posts: 12378 Topics: 75 Location: San Jose
|
|
Back to top |
|
 |
EugeneE Beginner
Joined: 24 Apr 2005 Posts: 8 Topics: 3
|
Posted: Mon Apr 25, 2005 7:47 pm Post subject: DB2 VIEW when the data gets loaded? |
|
|
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 |
|
 |
kolusu Site Admin

Joined: 26 Nov 2002 Posts: 12378 Topics: 75 Location: San Jose
|
Posted: Tue Apr 26, 2005 7:37 am Post subject: |
|
|
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 |
|
 |
CZerfas Intermediate
Joined: 31 Jan 2003 Posts: 211 Topics: 8
|
Posted: Wed Apr 27, 2005 5:33 am Post subject: |
|
|
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 |
|
 |
EugeneE Beginner
Joined: 24 Apr 2005 Posts: 8 Topics: 3
|
Posted: Wed Apr 27, 2005 6:45 pm Post subject: DB2 VIEW when the data gets loaded? |
|
|
Thank you Christian, will wait for version 8 |
|
Back to top |
|
 |
|
|