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"} );
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
;