Home » Other » Community Hangout » Show us what you do! (N/A)
Show us what you do! [message #671155] Thu, 16 August 2018 09:08 Go to next message
gazzag
Messages: 1082
Registered: November 2010
Location: Bristol, UK
Senior Member
I was perusing Richard Foote's Index Internals PDF from a link supplied by Ed Stevens here.

Can you spot the deliberate mistake? Wink
SQL> CREATE TABLE test_delete (id NUMBER, name VARCHAR2(10));
Table created.
SQL> CREATE INDEX test_delete_idx ON test_delete (name);
Index created.
SQL> INSERT INTO test_delete VALUES (1, 'BOWIE');
1 row created.
SQL> COMMIT;
Commit complete.
SQL> DELETE test_delete WHERE id = 1;
1 row updated.
SQL> SELECT file_id,block_id FROM dba_extents WHERE segment_name='TEST_DELETE_IDX';
FILE_ID BLOCK_ID
---------- --------------- 5 3441
SQL> ALTER SYSTEM DUMP DATAFILE 5 BLOCK 3442;
System altered.
Re: Show us what you do! [message #671161 is a reply to message #671155] Thu, 16 August 2018 10:03 Go to previous messageGo to next message
Michel Cadot
Messages: 66567
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator

3441 vs 3442.
The first block is the segment header, we can also deduce it is a MSSM tablespace otherwise he should add 3 (2 levels of bitmap block). Smile


Re: Show us what you do! [message #671162 is a reply to message #671161] Thu, 16 August 2018 10:05 Go to previous messageGo to next message
gazzag
Messages: 1082
Registered: November 2010
Location: Bristol, UK
Senior Member
There's at least one more Wink
Re: Show us what you do! [message #671205 is a reply to message #671162] Thu, 16 August 2018 13:36 Go to previous messageGo to next message
Littlefoot
Messages: 21501
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
Delete vs. updated:
SQL> DELETE test_delete WHERE id = 1;
1 row updated.
Re: Show us what you do! [message #671212 is a reply to message #671205] Fri, 17 August 2018 02:51 Go to previous messageGo to next message
gazzag
Messages: 1082
Registered: November 2010
Location: Bristol, UK
Senior Member
Correct Smile

And I would like to stress that this is not a criticism against Richard Foote who I respect greatly. We all make mistakes!
Re: Show us what you do! [message #671216 is a reply to message #671212] Fri, 17 August 2018 04:17 Go to previous messageGo to next message
Michel Cadot
Messages: 66567
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator

It happens to me soo often when I build a demo.
You copy and paste the wrong line and oops blunder!

Re: Show us what you do! [message #671217 is a reply to message #671155] Fri, 17 August 2018 04:41 Go to previous message
John Watson
Messages: 8012
Registered: January 2010
Location: Global Village
Senior Member
I saw Mr Foote give a lecture at the ODTUG KScope convention in June. He is a edifying and entertaining speaker but he doesn't use live demonstrations, he relies on slides.

My style is the opposite: I do everything live. Of course, my demo's sometimes go spectacularly wrong. Particularly when lecturing on SQL tuning, which means playing games with the optimizer. Dangerous: the optimizer is cleverer than me. But it does mean that I can adjust the lecture content dynamically in response to questions, and people seem to find it entertaining.

Previous Topic: FIFA World cup - France vs Croatia
Next Topic: ODTUG Kscope, Orlando FL, next week
Goto Forum:
  


Current Time: Mon Sep 23 06:26:27 CDT 2019