RE: I need to vent

From: Jeff Smith <jeff.d.smith_at_oracle.com>
Date: Thu, 3 Mar 2016 12:55:34 -0800 (PST)
Message-ID: <ba86bdc0-4bf2-4380-a892-b19e7018fc0e_at_default>



Well, impossible to see until you learn to use a code formatter of course  

From: Mladen Gogala [mailto:gogala.mladen_at_gmail.com] Sent: Thursday, March 03, 2016 3:52 PM
To: oracle-l_at_freelists.org
Subject: Re: I need to vent  

On 03/01/2016 10:56 AM, Matt Adams wrote:

1.8 million characters!!!!! How in bloody hell does ANYTHING write a single sql statement that 1.8 million characters long.    

Actually, it's quite simple:
select sysdate
<few millions of empty lines and space characters>
from dual;

Voila! One reason to write a thing like that would be to prank your favourite DBA. You can do it in a little bit more expensive way by doing something like this:

select count(*)
<few millions of empty lines with space characters>
from emp,emp,emp,emp,emp,emp,emp,emp,emp,emp,emp,emp,emp,emp,emp,emp,emp;

This is going to peg a CPU thread for a good 5 minutes, using 100% of CPU power. The "working part" is the FROM clause, which generates a Cartesian product and it is at the end of the mostly blank SQL, so it would be almost impossible to see using SQL*Developer or Toad. The downside of the SQL is that as soon as the DBA sees SCOTT.EMP used in production, she or he will probably kill the session immediately. The good side of this SQL is that it will send your BCHR through the roof.

-- 
Mladen Gogala
Oracle DBA
Tel: (347) 321-1217
--
http://www.freelists.org/webpage/oracle-l
Received on Thu Mar 03 2016 - 21:55:34 CET

Original text of this message