ora.properties - invalid selectRowCountSql
Brought to you by:
johncurrier
Hi John
We use Oracle with some large tables and want to show the number of rows in the SchemaSpy output. However, scanning these tables to count number of rows takes too long.
The solution offered for different dbTypes is great. However, the selectRowCountSql included in the default ora.properties is not quite correct.
The following does the trick and works with Oracle 11.
selectRowCountSql=select num_rows row_count from all_tables where table_name=:table and owner = :owner
Would it be possible to get the default ora.properties updated?
Thanks
Mark
The existing query is:
selectRowCountSql=select table_rows row_count from information_schema.tables where table_name=:table
Is it returning incorrect results?
Thanks,
John
Hi John
I am using oracle 11g and oracle 12c and the table 'information_schema.tables' doesn't exist.
It exists in mysql, which, even though 'oracle corporation' owns both, is quite a separate product family from oracle databases.
So the net effect is that code falls back to doing select count(*) which takes too long on the large tables.
Hope this helps.
Regards
Mark