Hello all ...
hopefully without sounding too obtuse, we've run into a case where we
need to persist the contents of a view for performance reasons. As I
understand it (and I don't really) Oracle has something called a
snapshot, which "automatica lly" persists the contents of a view and can
determine the delta of the contents somehow. This would be PERFECT for
this application, since the data only updates monthly maybe, but in
chunks of 5-10 million rows. Truncating the table (excue my Oracle-like
language, I mean importing/replacing with an empty delimited file
<smile>) and persisting the view all over again is gonna be an "over the
weekend" kind of task - 25 hours we estimate.
Can anyone suggest (without flaming) a way to accomodate what appears to
be a useful Oracle feature?
TIA,
Maiirhtin O'Feannag 4 2314
Take a look at materialized query tables (MQT's). It sounds like you
need to create one refresh deferred and then you need to create a
staging table to go along with it. Then you could do a delta refresh
rather than having to refresh the entire table.
"Mairhtin O'Feannag" <ir********@roc ketmail.com> wrote in message news:<Xn******* *************** ********@64.164 .98.7>... Hello all ...
hopefully without sounding too obtuse, we've run into a case where we need to persist the contents of a view for performance reasons. As I understand it (and I don't really) Oracle has something called a snapshot, which "automatica lly" persists the contents of a view and can determine the delta of the contents somehow. This would be PERFECT for this application, since the data only updates monthly maybe, but in chunks of 5-10 million rows. Truncating the table (excue my Oracle-like language, I mean importing/replacing with an empty delimited file <smile>) and persisting the view all over again is gonna be an "over the weekend" kind of task - 25 hours we estimate.
Can anyone suggest (without flaming) a way to accomodate what appears to be a useful Oracle feature?
TIA,
Maiirhtin O'Feannag
It's called a Materialized Query Table (MQT) in DB2.
Check out the CREATE TABLE statement and SET INTEGRITY.
You can refresh yourself, or you can have DB2 refresh for you
immediately or at a later time.
Cheers
Serge
Serge,
Kewl. But does a refresh mean a rebuild? Is it that way for Oracle? A
rebuild would be the same as we are doing now, which is to create table
like view and select * from the view and insert into the created table.
What were trying to do is avoid the rebuild of the entire contents, since
it will be on the order of 100 million rows.
Thanks,
M
Serge Rielau <sr*****@ca.e ye-bee-em.com> wrote in news:L9VUc.4221 32
$r**********@ne ws01.bloor.is.n et.cable.rogers .com: It's called a Materialized Query Table (MQT) in DB2. Check out the CREATE TABLE statement and SET INTEGRITY. You can refresh yourself, or you can have DB2 refresh for you immediately or at a later time.
Cheers Serge
DB2 can do incremental refresh automatically or upon request (SET
INTEGRITY).
There ar esoem classes where refresh can be done and other where it can't.
E.g. if you have a query with the MIN and MAX for groupings.
That can be maintained incrementally.
Cheers
Serge This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Jean-Marc Blaise |
last post by:
Dear all,
It seems there is a problem with some snapshot table functions, if you try
to divide by some element that is unset or equal to 0. This generates a trap
file with the db2fmp.exe process, that keeps going on, until your disk is
full. I'm on W2K, DB2 UDB 8.1 FP4.
Test case:
db2start
|
by: Prince Kumar |
last post by:
Is there anyway to display the partition number while taking snapshot
on all the partitions (-2) using the snapshot function?
ex,
select TABLESPACE_NAME, TOTAL_PAGES from table(SNAPSHOT_TBS_CFG ( ' ',
-2 )) as snap.
Is there anyway, I can get the partition number for which the data is
being retrieved?.
|
by: Civilian_Target |
last post by:
Is there any way in DB2 to automate the taking of a snapshot, for
example, a function that will cause a db2 snapshot to be taken every 5
minutes and written to a uniquely named file?
Am I better off attempting to do this with my poor knowledge of dos
batch files?
I'm running UDB 8.2 on Windows 2000.
Thanks.
|
by: Ina Schmitz |
last post by:
Hello,
I would like to get the logical and physical reads for every sql statement
executed.
Thatfore, I used the command "db2 get snapshot for dynamic sql on
<mydatabase>". There, I could see the logical and physical reads from
bufferpool for every statement monitored. Am I right?
But now, I would like to read these results out of a table so that I could
process them automatically. In which table(s) are the results of snapshot
for...
|
by: Tejas |
last post by:
Hi,
I have gone through the snapshot API. I need to use it for finding
location of database files, tablespace containers etc on a remote
machine. These parameters are present in the response. However, for
getting only some paramters, I get a huge response, with many
parameters that I do not need (mostly many are performance parameters).
How long can the snapshot response be, and can it considerably affect
performance?
| |
by: IkyL234 |
last post by:
I have a macro that simply runs a query which produces a report and then
attaches it as an email attachment - in a snapshot file format.
However, when i send the email, the recipient cannot open the snapshot file.
The macro function is the Output one.
I have tried to change the output file to a rich text format which is ok as
the recipient can naturally open it as a Word document - but the problem is
the formating of the document in...
|
by: Steven Thomas |
last post by:
I am working on a ASP.NET application using VB.NET.
I have a function that creates a snapshot file on a separate server
and passes a path back to the webpage. Now I want to display the
snapshot. If I cut and paste the path into the browser it opens
snapshot viewer. Exactly what I want. However, if I
response.redirect to the path, I get a error that the file can not be
found. If I response.redirect to "file:"+path It opens the snapshot...
|
by: jag |
last post by:
hi,
db2 documentation says that -2 option for SQL table function for taking
snapshot gives you global snapshot for all partition but it does not
anyone can share any experience with me ?
regards,
jag
|
by: veffen |
last post by:
Hello all,
I'm trying to call the snapshot table function SNAP_GET_TBSP via a jdbc
connection using the following query:
SELECT * FROM TABLE(SNAP_GET_TBSP(CAST(NULL AS VARCHAR(1), -1)) AS T
In CLP this works properly, but when I execute it from java, I get the
following SQL exception:
|
by: grant |
last post by:
Hi
I've copied Stephens code into my db, and can get it to work, but only
on "plain Jane" reports with no images.
Most of my reports has an unbound image obluect in them that I set to
an external image file using on_open code
I've searched through this group and there are a few comments about
snapshots not working with embedded images, and my testing seems to
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
| |
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
| |
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
| |