AW: Fastest way to count exact number of rows in a very large table
Date: Fri, 2 Oct 2020 20:37:25 +0200 (CEST)
Message-ID: <1601663845181.217105.d60a0f1a485223462a7b116ceb00012acf3c1d08_at_spica.telekom.de>
Hi Ashoke,
could you send the execute plan of the query too? I think there is no
general approach for that, it depends on several factors: whether the table
has indexes (normal/bitmap) and in case the table has indexes the size of
the table compared to the existing index...... But generally parallel
processing should help.
Best regards
-----Original-Nachricht-----
Dear All,
After the migration I need to compare the row count of this table in both
the source DB and the destination DB. It takes almost two hours to get the
row count from this table.
TO_CHAR(COUNT(*)
Could you please suggest some tips to get the row count faster so that it
reduces the cut-over downtime.
Thanks,
Ahmed
Betreff: Fastest way to count exact number of rows in a very large table
Datum: 2020-10-02T19:45:19+0200
Von: "Ashoke Mandal" <ramukam1983_at_gmail.com>
An: "ORACLE-L" <oracle-l_at_freelists.org>
I have a table with 108 billion rows and migrating this database from
Oracle 11g on Solaris to Oracle 12c on Linux.
SQL> select to_char(count(*), '999,999,999,999') from test_data;
108,424,262,144
Elapsed: 02:22:46.18
Ashoke
--
http://www.freelists.org/webpage/oracle-l
Received on Fri Oct 02 2020 - 20:37:25 CEST