Oracle FAQ Your Portal to the Oracle Knowledge Grid

Home -> Community -> Usenet -> c.d.o.misc -> Re: Newbie question re refreshing Materialized Views

Re: Newbie question re refreshing Materialized Views

From: <>
Date: Thu, 16 Aug 2007 13:42:35 -0700
Message-ID: <>

On Aug 16, 2:54 pm, Adam Cameron <> wrote:
> > As TRUNCATE is DDL, not DML,. two 'implied' commits occur, once before
> > the truncate does the dirty deed, and once after. As such, there
> > isn't any way to 'lock' this
> Ah. Makes sense.
> I need to do some reading up on why truncate works like that. Just for my
> own edification, I mean. I'm not doubting you, but it doesn't seem like a
> DDL type operation to me. Depends on how it's implemented I guess.
> > message. In 10g the data is deleted (DML, no commit, implied or
> > otherwise) so the behaviour you expect (returning a read-consistent
> > image from the time before the refresh began) would occur.
> Cool. I'm constrained by a 3rd party vendor (well: head office of our
> company) with the 9i thing; I've been campaigning for them to get their
> heads out of their arses and support 10g, but that's still in the workings.
> I will campaign some more.
> > Possibly that explains the situation.
> Yes it does!
> > David Fitzjarrell
> Cheers David.
> So it seems to me, to get reliable results from these things, I kinda have
> to roll-my-own "refresh" routine (possibly along the lines of what Gints
> touched on earlier). That's a bit of a pain in the butt, but I guess it
> means I get to learn some more. Which is always good. If not always
> convenient ;-)
> Thanks again.
> --
> Adam

Truncate works like that because it also releases all of the used storage except for the initial extent, hence it's DDL. There are other options to truncate which can alter this behaviour somewhat, but in general one uses truncate to do just that, clear out a table and reclaim most of the space it once used.

David Fitzjarrell Received on Thu Aug 16 2007 - 15:42:35 CDT

Original text of this message