Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Mailing Lists -> Oracle-L -> Re: GTT Locks
Notes in-line
Jonathan Lewis
http://www.jlcomp.demon.co.uk
The Co-operative Oracle Users' FAQ
http://www.jlcomp.demon.co.uk/faq/ind_faq.html
March 2004 Hotsos Symposium - The Burden of Proof
Dynamic Sampling - an investigation
March 2004 Charlotte OUG (www.cltoug.org) CBO Tutorial
April 2004 Iceland
June 2004 UK - Optimising Oracle Seminar
> John,
>
Jonathan
>
> The table GTT needs to be a Global Temporary table.
>
Absolutely true - I don't know how I managed to forget the GT bit when I was doing the test
Having corrected the error, I agree with your observations:
insert into gtt values (1);
Locks:
TY ID1 ID2 LMODE
-- ---------- ---------- ----------
TX 131091 7538 6 TO 30494 1 3
commit;
insert into gtt select rownum from user_objects where rownum = 1;
TY ID1 ID2 LMODE
-- ---------- ---------- ----------
TX 393219 7548 6 TM 30494 0 3 TO 30494 1 3
commit;
begin
for i in 1..10000 loop insert into gtt values (i); end loop;
TY ID1 ID2 LMODE
-- ---------- ---------- ----------
TX 458780 7532 6 TO 30494 1 3 ----------------------------------------------------------------Please see the official ORACLE-L FAQ: http://www.orafaq.com
-- Archives are at http://www.freelists.org/archives/oracle-l/ FAQ is at http://www.freelists.org/help/fom-serve/cache/1.html -----------------------------------------------------------------Received on Wed Mar 03 2004 - 12:00:57 CST