FAQ
Hi Listers,

Does any body have a script that gives you the number of rows of each table in a
database that has not been analyzed in a while.

TIA

Anjan

Search Discussions

  • Diana Duncan at Sep 21, 2000 at 1:34 pm
    This just does one schema, just change user_ to dba_ for all tables.

    set pages 200
    set heading off
    set feedback off
    spool do_count.sql
    select 'select count(*) as ' || table_name || ' from ' || table_name || ';'
    from user_tables;
    spool off
    set heading on
    @do_count
    set feedback on

    -----Original Message-----
    From: Anjan Thakuria
    Sent: Wednesday, September 20, 2000 6:56 PM
    To: Multiple recipients of list ORACLE-L
    Subject: Num of rows of all tables in a database...

    Hi Listers,

    Does any body have a script that gives you the number of rows of each table
    in a
    database that has not been analyzed in a while.

    TIA

    Anjan

    --
    Please see the official ORACLE-L FAQ: http://www.orafaq.com
    --
    Author: Anjan Thakuria
    INET: Anjan.Thakuria_at_sabre.com

    Fat City Network Services -- (858) 538-5051 FAX: (858) 538-5051
    San Diego, California -- Public Internet access / Mailing Lists
    --------------------------------------------------------------------

    To REMOVE yourself from this mailing list, send an E-Mail message
    to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in
    the message BODY, include a line containing: UNSUB ORACLE-L
    (or the name of mailing list you want to be removed from). You may
    also send the HELP command for other information (like subscribing).
  • Yosi_at_comhill.com at Sep 21, 2000 at 2:22 pm
    Counter.sql
    set echo off
    set pages 0
    set trimspool on
    set lines 199
    set feed off

    spool counter1.sql

    prompt spool %spooldir%\counter1.lst
    select 'select ''' || table_name || ''', count(*) cnt from ' || table_name
    ';'
    from user_tables
    /
    prompt spool off
    prompt set feed on
    prompt set pages 40
    spool off
    @counter1
    $ del counter1.sql
    -- end counter.sql

    HTH,

    Yosi
    -----Original Message-----
    From: Anjan Thakuria
    Sent: Wednesday, September 20, 2000 6:56 PM
    To: Multiple recipients of list ORACLE-L
    Subject: Num of rows of all tables in a database...


    Hi Listers,

    Does any body have a script that gives you the number of rows
    of each table in a
    database that has not been analyzed in a while.

    TIA
    Anjan

    --
    Please see the official ORACLE-L FAQ: http://www.orafaq.com
    --
    Author: Anjan Thakuria
    INET: Anjan.Thakuria_at_sabre.com

    Fat City Network Services -- (858) 538-5051 FAX: (858) 538-5051
    San Diego, California -- Public Internet access / Mailing Lists
    --------------------------------------------------------------------
    To REMOVE yourself from this mailing list, send an E-Mail message
    to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in
    the message BODY, include a line containing: UNSUB ORACLE-L
    (or the name of mailing list you want to be removed from). You may
    also send the HELP command for other information (like subscribing).
  • Anjan Thakuria at Sep 21, 2000 at 2:22 pm
    Thank you everybody. What I was looking for was though a PL/SQL procedure.

    Anjan

    Diana Duncan wrote:
    This just does one schema, just change user_ to dba_ for all tables.

    set pages 200
    set heading off
    set feedback off
    spool do_count.sql
    select 'select count(*) as ' || table_name || ' from ' || table_name || ';'
    from user_tables;
    spool off
    set heading on
    @do_count
    set feedback on

    -----Original Message-----
    Sent: Wednesday, September 20, 2000 6:56 PM
    To: Multiple recipients of list ORACLE-L

    Hi Listers,

    Does any body have a script that gives you the number of rows of each table
    in a
    database that has not been analyzed in a while.

    TIA
    Anjan

    --
    Please see the official ORACLE-L FAQ: http://www.orafaq.com
    --
    Author: Anjan Thakuria
    INET: Anjan.Thakuria_at_sabre.com

    Fat City Network Services -- (858) 538-5051 FAX: (858) 538-5051
    San Diego, California -- Public Internet access / Mailing Lists
    --------------------------------------------------------------------
    To REMOVE yourself from this mailing list, send an E-Mail message
    to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in
    the message BODY, include a line containing: UNSUB ORACLE-L
    (or the name of mailing list you want to be removed from). You may
    also send the HELP command for other information (like subscribing).
    --
    Please see the official ORACLE-L FAQ: http://www.orafaq.com
    --
    Author: Diana Duncan
    INET: Diana_at_fileFRENZY.com

    Fat City Network Services -- (858) 538-5051 FAX: (858) 538-5051
    San Diego, California -- Public Internet access / Mailing Lists
    --------------------------------------------------------------------
    To REMOVE yourself from this mailing list, send an E-Mail message
    to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in
    the message BODY, include a line containing: UNSUB ORACLE-L
    (or the name of mailing list you want to be removed from). You may
    also send the HELP command for other information (like subscribing).

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
grouporacle-l @
categoriesoracle
postedSep 20, '00 at 9:50p
activeSep 21, '00 at 2:22p
posts4
users3
websiteoracle.com

People

Translate

site design / logo © 2022 Grokbase