I'm trying to execute the below code to check if I'm able to connect to my database.
Note: I'm running this on a Linux machine
importjava.sql.Connection;importjava.sql.DriverManager;publicclasstest{publicstaticvoidmain(String[]args){Connectionconnection=null;Longt0=System.nanoTime();try{StringmsAccDB="/work/users/natarajan/test.accdb";StringdbURL="jdbc:ucanaccess://"+msAccDB;connection=DriverManager.getConnection(dbURL);System.out.printf("Database opened in %.3f seconds%n",(System.nanoTime()-t0)/1000000000.0);}catch(Exceptione){e.printStackTrace(System.err);}}}
The code runs for a really long time and comes to a halt finally. Below is my output.
WARNING:You shouldn't use 'user' reserved word as column name in the table Email_Event_Recipients (it refers to the database user).
Escape it in your SQL!
(e.g. SELECT [USER] FROM TABLE WHERE [USER]='Joe')
WARNING:You shouldn't use 'user' reserved word as column name in the table Users (it refers to the database user).
Escape it in your SQL!
(e.g. SELECT [USER] FROM TABLE WHERE [USER]='Joe')
WARNING:Unknown expression: GenUniqueID() (default value of column Counter table Cover)
WARNING:Unknown expression: GenUniqueID() (default value of column Counter table Users)
Database opened in 1733.578 seconds
For opening the database, it takes close to 30 mins! the db size is 200 MB. Can you please help
Last edit: Natarajan Chidhambharam 2017-11-02
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi Natarajan,
are you able to share an (anonymized) version of your db for us to reproduce the behavior and look at it with a profiler.
Is your table actually called 'table' ...? just curious
which are your os and jre?
cheers,
Markus
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I'm trying to execute the below code to check if I'm able to connect to my database.
Note: I'm running this on a Linux machine
The code runs for a really long time and comes to a halt finally. Below is my output.
For opening the database, it takes close to 30 mins! the db size is 200 MB. Can you please help
Last edit: Natarajan Chidhambharam 2017-11-02
What's your xmx? Are there BLOB columns in your db? Have you tried the skipIndexes=true parameter?
Hi Marco, the details regarding the heap size
There is one table that has a BLOB column (OLE data type). But there is no data in the table.
I tried skipIndexes=true parameter in the code and still it is taking the same time to execute.
Hi Natarajan,
are you able to share an (anonymized) version of your db for us to reproduce the behavior and look at it with a profiler.
Is your table actually called 'table' ...? just curious
which are your os and jre?
cheers,
Markus