<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: SQL or PLSQL program for getting count(*) of tables !! in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/sql-or-plsql-program-for-getting-count-of-tables/m-p/2764553#M894339</link>
    <description>If you are using the cost based optimizer, you should be gathering statistics regularly.  This is one of the values computed (num_rows).  For a really easy method - you could always just "insert into my_stat_table select table_name, num_rows from dba_tables).  This, of course, assumes you update your statistic every day before you do the insert.&lt;BR /&gt;&lt;BR /&gt;</description>
    <pubDate>Tue, 16 Jul 2002 22:16:39 GMT</pubDate>
    <dc:creator>Jeanine Kone</dc:creator>
    <dc:date>2002-07-16T22:16:39Z</dc:date>
    <item>
      <title>SQL or PLSQL program for getting count(*) of tables !!</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/sql-or-plsql-program-for-getting-count-of-tables/m-p/2764549#M894335</link>
      <description>Hi all,&lt;BR /&gt;&lt;BR /&gt;I am planning to keep all the count(*) figures for all my tables to a statistic table.  Any idea for using SQL or PLSQL to do this ??&lt;BR /&gt;&lt;BR /&gt;Cheers,&lt;BR /&gt;&lt;BR /&gt;Chris,</description>
      <pubDate>Tue, 16 Jul 2002 08:32:43 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/sql-or-plsql-program-for-getting-count-of-tables/m-p/2764549#M894335</guid>
      <dc:creator>Chris Fung</dc:creator>
      <dc:date>2002-07-16T08:32:43Z</dc:date>
    </item>
    <item>
      <title>Re: SQL or PLSQL program for getting count(*) of tables !!</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/sql-or-plsql-program-for-getting-count-of-tables/m-p/2764550#M894336</link>
      <description>Is there a reason that you have such a POOR record of assigning points? &lt;BR /&gt;&lt;BR /&gt;This member has assigned points to 93 of 164 responses to his/her questions.&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://forums.itrc.hp.com/cm/TopSolutions/1,,CA721374!1!questions,00.html" target="_blank"&gt;http://forums.itrc.hp.com/cm/TopSolutions/1,,CA721374!1!questions,00.html&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;live free or die&lt;BR /&gt;harry</description>
      <pubDate>Tue, 16 Jul 2002 10:39:27 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/sql-or-plsql-program-for-getting-count-of-tables/m-p/2764550#M894336</guid>
      <dc:creator>harry d brown jr</dc:creator>
      <dc:date>2002-07-16T10:39:27Z</dc:date>
    </item>
    <item>
      <title>Re: SQL or PLSQL program for getting count(*) of tables !!</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/sql-or-plsql-program-for-getting-count-of-tables/m-p/2764551#M894337</link>
      <description>Hi Chris,&lt;BR /&gt;&lt;BR /&gt;the basic idea usually is to write a SQL script which creates the SQL script you want, and then start it.&lt;BR /&gt;Something like&lt;BR /&gt;&lt;BR /&gt;connect internal&lt;BR /&gt;set termout off&lt;BR /&gt;set feedback off&lt;BR /&gt;spool /tmp/count.sql&lt;BR /&gt;select 'select count(*) from ' || TABLE_NAME || ';' "rem cmd" &lt;BR /&gt;from DBA_TABLES;&lt;BR /&gt;spool off;&lt;BR /&gt;start /tmp/count.sql&lt;BR /&gt;&lt;BR /&gt;HTH,&lt;BR /&gt;Wodisch</description>
      <pubDate>Tue, 16 Jul 2002 16:51:04 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/sql-or-plsql-program-for-getting-count-of-tables/m-p/2764551#M894337</guid>
      <dc:creator>Wodisch_1</dc:creator>
      <dc:date>2002-07-16T16:51:04Z</dc:date>
    </item>
    <item>
      <title>Re: SQL or PLSQL program for getting count(*) of tables !!</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/sql-or-plsql-program-for-getting-count-of-tables/m-p/2764552#M894338</link>
      <description>There would be a few ways to do this.  A PL/SQL statement would work, however you would have to be able to support it in the future.  The following should work (caveat emptor though).  &lt;BR /&gt;------&lt;BR /&gt;declare&lt;BR /&gt;   cursor tablelist is select table_name from user_tables;&lt;BR /&gt;   tabname varchar2(40);&lt;BR /&gt;   sqlstatement varchar2(200);&lt;BR /&gt;   numcount varchar2(20);&lt;BR /&gt;begin&lt;BR /&gt;   open tablelist;&lt;BR /&gt;   loop&lt;BR /&gt;      fetch tablelist into tabname;&lt;BR /&gt;      exit when tablelist%NOTFOUND;&lt;BR /&gt;      sqlstatement:='select count(*) from '||tabname;&lt;BR /&gt;      execute immediate sqlstatement into numcount;&lt;BR /&gt;      insert into stat_table values (tabname,sysdate,numcount);&lt;BR /&gt;   end loop;&lt;BR /&gt;end;&lt;BR /&gt;/&lt;BR /&gt;-----------&lt;BR /&gt;&lt;BR /&gt;Brian</description>
      <pubDate>Tue, 16 Jul 2002 21:22:33 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/sql-or-plsql-program-for-getting-count-of-tables/m-p/2764552#M894338</guid>
      <dc:creator>Brian Crabtree</dc:creator>
      <dc:date>2002-07-16T21:22:33Z</dc:date>
    </item>
    <item>
      <title>Re: SQL or PLSQL program for getting count(*) of tables !!</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/sql-or-plsql-program-for-getting-count-of-tables/m-p/2764553#M894339</link>
      <description>If you are using the cost based optimizer, you should be gathering statistics regularly.  This is one of the values computed (num_rows).  For a really easy method - you could always just "insert into my_stat_table select table_name, num_rows from dba_tables).  This, of course, assumes you update your statistic every day before you do the insert.&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Tue, 16 Jul 2002 22:16:39 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/sql-or-plsql-program-for-getting-count-of-tables/m-p/2764553#M894339</guid>
      <dc:creator>Jeanine Kone</dc:creator>
      <dc:date>2002-07-16T22:16:39Z</dc:date>
    </item>
    <item>
      <title>Re: SQL or PLSQL program for getting count(*) of tables !!</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/sql-or-plsql-program-for-getting-count-of-tables/m-p/2764554#M894340</link>
      <description>Hey Harry,&lt;BR /&gt;&lt;BR /&gt;Honestly, I am not quite aware to give points in HP forums in my past few years!!  However, you can check my recent records, among the recent 6 months+, I always give points to those who answer my questions.  &lt;BR /&gt;&lt;BR /&gt;I really appreciate you guys spend time and effort to help me.  That's the process for me to grow up, to be mature and to be fair for others.&lt;BR /&gt;&lt;BR /&gt;Please be fair to me and don't just count on me in the "PAST"&lt;BR /&gt;&lt;BR /&gt;Chris,</description>
      <pubDate>Wed, 17 Jul 2002 02:10:52 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/sql-or-plsql-program-for-getting-count-of-tables/m-p/2764554#M894340</guid>
      <dc:creator>Chris Fung</dc:creator>
      <dc:date>2002-07-17T02:10:52Z</dc:date>
    </item>
  </channel>
</rss>

