James,
Well I guess we all suffer from a little fog once in a while. In my case it
was getting the reply out rather hastily. Therefore,
In Oracle 8+ the default for a snapshot is to use the source table's primary
key, not the rowid. Therefore if the snapshot and the snapshot log are created
with the default they will not contain a rowid column, but a copy of the primary
key column(s). On the other hand, if the "with rowid" option is specified in
both the 'create snapshot' AND 'create snapshot log' commands then the rowid
becomes the primary key of the snapshot. In either case a primary key will
exist in both the snapshot and snapshot logs which the DB can use to uniquely
identify the rows in the snapshot that require maintenance.
Now to the original question, would the refresh fire a query against the
source table. Depends. If the dml is an update or insert yes it will. If it's
a delete then it won't. In either case there will be a primary key of sorts
used.
Dick Goulet
____________________Reply Separator____________________
Subject: Re: Re[2]: snapshots
Author: james ellis <jellis24_gso_at_yahoo.com>
Date: 1/16/2001 9:05 AM
I am sorry I don't think I was clear with my answer.
In the snap$_table_name table there is a field that
stores the rowid of the record from the master table.
I would think if a record is in the mlog$ table with a
delete dml type Oracle can delete it from the
snap$_table_name table by using rowid.
- dgoulet_at_vicr.com wrote:
> James,
>
> Rowid's are not included in snapshots unless
> specifically specified in the
> create snapshot statement with the "with rowid"
> qualifier. With primary key is
> the default.
>
> Dick Goulet
>
> ____________________Reply
> Separator____________________
> Author: james ellis <jellis24_gso_at_yahoo.com>
> Date: 1/12/2001 2:16 PM
>
> Dennis,
> I would think since the snap$ table has the rowid
> value that when a delete needs to be performed it
> would delete using the rowid.
>
> James
> --- Dennis Taylor <ismgr_at_pctc.com> wrote:
> > At 10:06 AM 1/12/01 -0800, you wrote:
> > >hi list
> > >
> > >would any refresh of a snapshot fire a query
> > against the base table?
> > >
> > > i think its supposed to go against the mlog$
> table
> > of the base table. we
> > >have a situation where there is a poor-performing
> > query that is fired at
> > >exact intervals accessing the base table and no
> > application seems to be
> > >firing it?
> >
> > The mlog$ table only contains a couple of fields,
> > one of which is the ROWID
> > of the affected record, and another is the dml
> > operation (insert, delete,
> > update). I'd assume that the snapshot update uses
> > this info to go get the
> > affected record (unless it's a delete) from the
> base
> > table.
> >
> > This is weird when you think of it. It implies
> that
> > the snapshot process is
> > able to get "old" information, i.e. the record
> from
> > before the delete, so
> > that it can grab the PK info. Or am I missing
> > something?
> >
> >
> > Dennis Taylor
> > --------------------------------
> > Save the plankton - nuke the whales!
> >
> > --
> > Please see the official ORACLE-L FAQ:
> > http://www.orafaq.com
> > --
> > Author: Dennis Taylor
> > INET: ismgr_at_pctc.com
> >
> > Fat City Network Services -- (858) 538-5051
> FAX:
> > (858) 538-5051
> > San Diego, California -- Public Internet
> > access / Mailing Lists
> >
>
> > To REMOVE yourself from this mailing list, send an
> > E-Mail message
> > to: ListGuru_at_fatcity.com (note EXACT spelling of
> > 'ListGuru') and in
> > the message BODY, include a line containing: UNSUB
> > ORACLE-L
> > (or the name of mailing list you want to be
> removed
> > from). You may
> > also send the HELP command for other information
> > (like subscribing).
>
>
> __________________________________________________
> Do You Yahoo!?
> Yahoo! Photos - Share your holiday photos online!
> http://photos.yahoo.com/
> --
> Please see the official ORACLE-L FAQ:
> http://www.orafaq.com
> --
> Author: james ellis
> INET: jellis24_gso_at_yahoo.com
>
> Fat City Network Services -- (858) 538-5051 FAX:
> (858) 538-5051
> San Diego, California -- Public Internet
> access / Mailing Lists
>
> To REMOVE yourself from this mailing list, send an
> E-Mail message
> to: ListGuru_at_fatcity.com (note EXACT spelling of
> 'ListGuru') and in
> the message BODY, include a line containing: UNSUB
> ORACLE-L
> (or the name of mailing list you want to be removed
> from). You may
> also send the HELP command for other information
> (like subscribing).
> --
> Please see the official ORACLE-L FAQ:
> http://www.orafaq.com
> --
> Author:
> INET: dgoulet_at_vicr.com
>
> Fat City Network Services -- (858) 538-5051 FAX:
> (858) 538-5051
> San Diego, California -- Public Internet
> access / Mailing Lists
>
> To REMOVE yourself from this mailing list, send an
> E-Mail message
> to: ListGuru_at_fatcity.com (note EXACT spelling of
> 'ListGuru') and in
> the message BODY, include a line containing: UNSUB
> ORACLE-L
> (or the name of mailing list you want to be removed
> from). You may
> also send the HELP command for other information
> (like subscribing).
Do You Yahoo!?
Get email at your own domain with Yahoo! Mail.
http://personal.mail.yahoo.com/
--
Please see the official ORACLE-L FAQ: http://www.orafaq.com
--
Author: james ellis
INET: jellis24_gso_at_yahoo.com
Fat City Network Services -- (858) 538-5051 FAX: (858) 538-5051
San Diego, California -- Public Internet access / Mailing Lists
--------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
Received on Wed Jan 17 2001 - 09:30:41 CST