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: so, what is the right way to count tablespace free space

Re: so, what is the right way to count tablespace free space

From: Anurag Varma <avoracle_at_gmail.com>
Date: 20 May 2005 13:09:22 -0700
Message-ID: <1116619762.091533.165060@o13g2000cwo.googlegroups.com>

Question for you:

tableA contains 1 row
ORA92> select * from tableA;

COL1                      MYNUM

-------------------- ----------
SYSTEM 100

1 row selected.

tableB contains 10 rows
ORA92> select * from tableB;

COL1                      MYNUM

-------------------- ----------
SYSTEM 1 SYSTEM 1 SYSTEM 1 SYSTEM 1 SYSTEM 1 SYSTEM 1 SYSTEM 1 SYSTEM 1 SYSTEM 1 SYSTEM 1

10 rows selected.

what will the following sql return?:

select sum(tableA.mynum), sum(tableB.mynum) from tableA, tableB
where tableA.col1 = tableB.col1
/

?

The question directly pertains to your 3rd option (Hint: Wrong query!).

The first option and the second option are not doing the same thing. First one accounts for autoextending datafiles, the second one doesn't.

Careful with that axe, Eugene :) Received on Fri May 20 2005 - 15:09:22 CDT

Original text of this message

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