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

Home -> Community -> Usenet -> c.d.o.misc -> Re: SQL with no output

Re: SQL with no output

From: Rick Denoire <100.17706_at_germanynet.de>
Date: Thu, 20 Nov 2003 23:33:14 +0100
Message-ID: <6meqrv0cp45ct6rp9rlhgjfm3ld3kdq47p@4ax.com>


"mcstock" <mcstockspamplug_at_spamdamenquery.com> wrote:

>1) nest the statement in a count() statement, i.e.
>select count(<some non-indexes column)) from (
>select ...
>from ...

As you said, skewed.

>2) use the following SQL*Plus commands
>set termout off
>spool some_output_file
><run commands from a script file>
>set termout on
>
>then do a grep or FIND on the spool file for 'Elapsed'

If I really wanted to do that for myself, I would just put the SQL commands in a here script and execute it from the shell, redirecting the standard output to /dev/null. BUT: It is not me who needs to run this "benchmark". A Windows user is the one who is supposed to run the SQL commands (from a DOS command shell, for example). In other words, no "grep" and such fancy commands there.

Since this is supposed to be a "benchmark", redrawing the screen while the output is being displayed could affect the overall elapsed time in an undesired manner (I don't want to measure how fast the computer redraws the screen).

Well, if the amount of returned raws in considerable large, even writing them into a spool file could adversely influence the real execution time on the server side. The only solution is to let sqlplus to accept returned rows and send them to "nirvana" (network speed could still be an issue).

Thanks
Rick Denoire Received on Thu Nov 20 2003 - 16:33:14 CST

Original text of this message

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