Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: How does "describe" work (difficult)

Re: How does "describe" work (difficult)

From: Thomas Kyte <tkyte_at_us.oracle.com>
Date: 22 Dec 2001 16:20:52 -0800
Message-ID: <a0381405ec@drn.newsguy.com>


In article <87vgezw1zd.fsf_at_altavista.net>, Martin says...
>
>I know how one could write a "describe" command by querying the data
>dictionary, but recently I made a strange observation:
>
>I turned on sqltrace, ran a "describe" command and turned sqltrace
>back off. The trace file showed the "trace on" and "trace off"
>commands but the "describe" command itself literally left no trace at
>all.
>
>How could sqlplus possibly implement a describe command without causing
>an sqltrace ? Also it is amazingly fast, even when you describe a
>table at the other end of a database link which is aliased by a
>synonym.
>

it gets it from the dictionary cache. If you fire up an instance or describe something that hasn't been described, you'll see the recursive SQL used to get the info into the dictionary cache.

When you DON'T see the SQL being executed -- that just means the info was in the dictionary cache.

>I also ran "strace sqlplus". This showed a socked write and a socked
>read. This is no surprise, all commands basically look like like this
>(not just describe). I believe this is just classic SQL*Net
>communication. I don't know WHAT it writes though.

--
Thomas Kyte (tkyte@us.oracle.com)             http://asktom.oracle.com/ 
Expert one on one Oracle, programming techniques and solutions for Oracle.
http://www.amazon.com/exec/obidos/ASIN/1861004826/  
Opinions are mine and do not necessarily reflect those of Oracle Corp 
Received on Sat Dec 22 2001 - 18:20:52 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US