Re: Inserts and db file sequential reads
Date: Sun, 4 May 2008 09:38:18 +0100
Message-ID: <NvKdnVb8eNNk6IDVRVnyvwA@bt.com>
"William Robertson" <williamr2019_at_googlemail.com> wrote in message
news:6c24a3aa-971b-4aa0-96e7-a26862d8595a_at_y38g2000hsy.googlegroups.com...
> On May 2, 11:52 pm, oracleing..._at_yahoo.com wrote:
>> INSERT /*+ append */ INTO OPERATION_DTLS
>> VALUES
>
> INSERT /*+ APPEND */ is only applicable to INSERT SELECT, not INSERT
> VALUES. Just as well, as each INSERT /*+ APPEND */ uses new blocks
> above the high water mark rather than looking for space in existing
> blocks, so unless each row uses exactly one block it could waste a
> load of space.
William,
I nearly made the same comment in my post, and then I decided to hedge my bets a little because I wasn't sure that it would be true in all cases.
The one that crossed my mind was the pl/sql array insert looking something like:
for all i in 1..m_ct
insert into tableX values(m_array1(i), m_array2(i) ...);
It operates as a genuine array insert - which means that /*+ append */ may be relevant - but it does have a values() clause - which means that /*+ append */ may be ignored.
Does your comment apply in this case as well as the single-row case ? I didn't have time to run up a test case to check.
-- Regards Jonathan Lewis http://jonathanlewis.wordpress.com Author: Cost Based Oracle: Fundamentals http://www.jlcomp.demon.co.uk/cbo_book/ind_book.html The Co-operative Oracle Users' FAQ http://www.jlcomp.demon.co.uk/faq/ind_faq.htmlReceived on Sun May 04 2008 - 03:38:18 CDT