2

DatabaseMetaData().getTables() - is very slow, Is there any alternative of this?

Following is my actual code :

connection.getMetaData().getTables(null,null,null,new String[] {"TABLE", "VIEW"} );
Muhammad Iqbal
  • 144
  • 1
  • 1
  • 12

1 Answers1

1

You can directly fire the below queries through statement in java and obtain the result in resultset

Oracle:

select tablespace_name, table_name from dba_tables;

MySQL:

show tables

PostgreSQL :

SELECT * FROM pg_catalog.pg_tables;

ABC
  • 354
  • 2
  • 3
  • 13