Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>How long does that SQL actually take? You are only going to run it once I presume, having fixed the bug that caused the corruption in the first place? I just set up a test case like this:</p> <pre><code>SQL&gt; create table my_objects as 2 select object_name, ceil(rownum/5) groupid, rpad('x',500,'x') filler 3 from all_objects; Table created. SQL&gt; select count(*) from my_objects; COUNT(*) ---------- 83782 SQL&gt; select * from my_objects where groupid in ( 2 select groupid from my_objects 3 group by groupid 4 having count(*) &lt;&gt; 5 5 ); OBJECT_NAME GROUPID FILLER ------------------------------ ---------- -------------------------------- XYZ 16757 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx YYYY 16757 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx Elapsed: 00:00:01.67 </code></pre> <p>Less than 2 seconds. OK, my table has half as many rows as yours, but 160K isn't huge. I added the filler column to make the table take up some disk space. The AUTOTRACE execution plan was:</p> <pre><code>------------------------------------------------------------------------- | Id | Operation | Name | Rows | Bytes | Cost (%CPU)| ------------------------------------------------------------------------- | 0 | SELECT STATEMENT | | 389 | 112K| 14029 (2)| |* 1 | HASH JOIN | | 389 | 112K| 14029 (2)| | 2 | VIEW | VW_NSO_1 | 94424 | 1198K| 6570 (2)| |* 3 | FILTER | | | | | | 4 | HASH GROUP BY | | 1 | 1198K| 6570 (2)| | 5 | TABLE ACCESS FULL| MY_OBJECTS | 94424 | 1198K| 6504 (1)| | 6 | TABLE ACCESS FULL | MY_OBJECTS | 94424 | 25M| 6506 (1)| ------------------------------------------------------------------------- </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload