Hi,

Maybe the performance problem is hashing the password. Could you try using
an empty user name and password? Both need to be empty (the user name AND
password). If it is still slow, could you use the profiler to analyze what
is slow? See the performance section in the docs for details:
http://h2database.com/html/performance.html#application_profiling :

Profiler profiler = new Profiler();
profiler.startCollecting();
Connection conn = DriverManager.getConnection(url, "", "");
System.out.println(profiler.getTop(3));


Regards, Thomas


On Sun, Jan 5, 2014 at 4:32 PM, Famco <[email protected]> wrote:

> I just tested the getConnection call. Noel is right: the second call just
> needs 14 mSec (user sa, empty password).
>
> As I am new to H2 and Raspberry there are many questions. Not all are
> covered by the manual.
> Is it ok to use the same connection by serveral threads if the access is
> synchronized as follows:
>
> int getCount()
> {
>    synchronized(this) {
>       Statement stmt=connection.createStatement (  ... );
>       ResultSet rs=stmt.executeQuery("count (*) as count form messwerte ");
>       return rs.getInt("count");
>
>    }
> }
>
>
>
>
> Am Donnerstag, 2. Januar 2014 14:12:37 UTC+1 schrieb Famco:
>
>> Hi,
>>
>>
>> I am working on a home project with h2 on Raspberry Pi. I managed to get
>> the h2 running and it seems to work good and pretty fast. Now I have some
>> questions wich the manual doesnt answer:
>>
>> 1)  the quickstart section on the homepage tells that using "jdbc:h2:~/test"
>> should create the test database in the homedirectory. In fact the database
>> exists (because it works!), but i cannot find the file on the raspberry pi.
>> 2) should I use any special settings to avoid problems caused by an
>> unexpected "powerdown" of the raspberry?
>>
>> Thank you in advance
>>
>> Famco
>>
>  --
> You received this message because you are subscribed to the Google Groups
> "H2 Database" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To post to this group, send email to [email protected].
> Visit this group at http://groups.google.com/group/h2-database.
> For more options, visit https://groups.google.com/groups/opt_out.
>

-- 
You received this message because you are subscribed to the Google Groups "H2 
Database" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/h2-database.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to