You could try to use CREATE MEMORY TABLE + CREATE UNIQUE HASH INDEX.
This will keep indexes in memory and insertion will have O(1) complexity.
Of course this makes sense only if you have enough RAM to hold all your
hashes.

Few side notes:
I think your primary key is redundant if you already have UNIQUE NOT NULL
field `hash`.
I'd suggest to use UUID data type instead of BINARY for `hash`, H2 supports
it natively.

Sergi

2015-05-11 20:43 GMT+03:00 Stig Christensen <[email protected]>:

> 1.4 seems to be slower than 1.3
>
> h2-1.4.187
> Done in 3698 (ms)
> Done in 5851
> Done in 7583
> Done in 8722
> Done in 9380
>
> h2-1.3.170
> Done in 2184
> Done in 2732
> Done in 3355
> Done in 3792
> Done in 4917
>
> --
> 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/d/optout.
>

-- 
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/d/optout.

Reply via email to