Re: [h2] Database size is strangely big, actual data is not so much, dropping/adding rows/tables does not modify file size, Database size after cleaned is anyway very big even if no data is present an

2016-08-11 Thread Noel Grandin
If you want to downgrade, you will need to do a dump and restore​

-- 
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 h2-database+unsubscr...@googlegroups.com.
To post to this group, send email to h2-database@googlegroups.com.
Visit this group at https://groups.google.com/group/h2-database.
For more options, visit https://groups.google.com/d/optout.


[h2] Re: What is the last stable version of H2 for 1.4.x versions.

2016-08-11 Thread lakshman udayakantha
Hi Steve,

Anyway I see in wikipedia https://en.wikipedia.org/wiki/H2_(DBMS) , 1.4.191 
as a stable release. 


On Thursday, August 11, 2016 at 11:36:03 AM UTC+5:30, lakshman udayakantha 
wrote:
>
> Hi,
>
> H2Database site says that last stable version is 1.3.176. Is there any 
> last stable version in 1.4.x versions?
>
> Thanks
> Lakshman
>

-- 
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 h2-database+unsubscr...@googlegroups.com.
To post to this group, send email to h2-database@googlegroups.com.
Visit this group at https://groups.google.com/group/h2-database.
For more options, visit https://groups.google.com/d/optout.


Re: [h2] Database size is strangely big, actual data is not so much, dropping/adding rows/tables does not modify file size, Database size after cleaned is anyway very big even if no data is present an

2016-08-11 Thread ck

I can't by any means use an unscalable format because I want to provide a 
long-term working environment without being anxious it will fail sometimes
I just want to clean the database, bring it to minimal size, and downgrade to 
1.3 stable
Can anyone help me please? I have been waiting for very long but got no replies

-- 
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 h2-database+unsubscr...@googlegroups.com.
To post to this group, send email to h2-database@googlegroups.com.
Visit this group at https://groups.google.com/group/h2-database.
For more options, visit https://groups.google.com/d/optout.


Re: [h2] Potential performance improvement

2016-08-11 Thread Noel Grandin
which version are you testing against? Because in recent versions we
already cache the Calendar object in DateTimeUtils.CACHED_CALENDAR, at
which point the ZONE_OFFSET should be cheap to calculate.

-- 
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 h2-database+unsubscr...@googlegroups.com.
To post to this group, send email to h2-database@googlegroups.com.
Visit this group at https://groups.google.com/group/h2-database.
For more options, visit https://groups.google.com/d/optout.


[h2] Potential performance improvement

2016-08-11 Thread Steve McLeod
I'm seeking some advice on a performance improvement. 

I did some profiling on a query that returns 500K rows of data. I 
discovered that one method in org.h2.util.DateTimeUtils uses about 25% of 
the elapsed time:

public static long getTimeLocalWithoutDst(java.util.Date d) {
Calendar calendar = getCalendar();
return d.getTime() + calendar.get(Calendar.ZONE_OFFSET);
}

I made a modified version of H2 which only calculates 
calendar.get(Calendar.ZONE_OFFSET) once per session, and the performance of 
my query did improve dramatically.

Here's my code:

private static int zoneOffset = Integer.MIN_VALUE;

public static long getTimeLocalWithoutDst(java.util.Date d) {
if (zoneOffset == Integer.MIN_VALUE) {
Calendar calendar = getCalendar();
zoneOffset = calendar.get(Calendar.ZONE_OFFSET);
}

return d.getTime() + zoneOffset;
}


However I think that this introduces a bug. If the timezone of the computer 
changes while H2 is running, then with my 'improvement' H2 would continue 
to use the wrong zoneOffset value.

I think it would be acceptable to calculate the zoneOffset value once per 
query. The performance gains would be there, but the code would continue to 
be correct when the computer's timezone changes.

What do you think about that? Do you have a suggestion how I could do this?

-- 
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 h2-database+unsubscr...@googlegroups.com.
To post to this group, send email to h2-database@googlegroups.com.
Visit this group at https://groups.google.com/group/h2-database.
For more options, visit https://groups.google.com/d/optout.


Re: [h2] Shall I add H2 to Travis CI?

2016-08-11 Thread Sergi Vladykin
Very good idea! I wanted to do exactly that, but never got time. It will be
a great contribution!

Sergi

2016-08-11 13:18 GMT+03:00 Steve McLeod :

> Travis CI is web-based continuous integration that works well with GitHub
> and is free for open source.
>
> I propose adding H2 to Travis. This will make it clear almost immediately
> after a commit to master that the build is broken. I think it can also do
> the same to pull requests, before they get accepted.
>
> I volunteer to do the necessary work.
>
> A good idea? Or an unnecessary extra burden?
>
>
> --
> 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 h2-database+unsubscr...@googlegroups.com.
> To post to this group, send email to h2-database@googlegroups.com.
> Visit this group at https://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 h2-database+unsubscr...@googlegroups.com.
To post to this group, send email to h2-database@googlegroups.com.
Visit this group at https://groups.google.com/group/h2-database.
For more options, visit https://groups.google.com/d/optout.


[h2] Shall I add H2 to Travis CI?

2016-08-11 Thread Steve McLeod
Travis CI is web-based continuous integration that works well with GitHub 
and is free for open source.

I propose adding H2 to Travis. This will make it clear almost immediately 
after a commit to master that the build is broken. I think it can also do 
the same to pull requests, before they get accepted.

I volunteer to do the necessary work.

A good idea? Or an unnecessary extra burden?


-- 
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 h2-database+unsubscr...@googlegroups.com.
To post to this group, send email to h2-database@googlegroups.com.
Visit this group at https://groups.google.com/group/h2-database.
For more options, visit https://groups.google.com/d/optout.


[h2] Re: load entire database in memory

2016-08-11 Thread Steve McLeod
This is the wrong list for your question.  Ask on stackoverflow.com or a 
general database design forum.


On Saturday, 6 August 2016 17:03:58 UTC+2, vicenrico wrote:
>
> Hello. I have a question.
> I'm developing a program and I would like how to improve my db scheme 
> desing.
> Currently I'm developing a movie manager program with 20 tables. The main 
> table is the movie table with 30 fields.I'd like to know whether I should 
> load the entire table into a movies object list or it would be better if a 
> loaded only the ids, and when the user scrolls down the movies list, go and 
> load the rest of the fields.
>
> In other words, should I go for a list of Movies Objects, with 30 fields 
> as members of Movies objects, or only a Movie object with the id field, and 
> do lazy loading as requiered.
>
> Thanks in advance.
>

-- 
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 h2-database+unsubscr...@googlegroups.com.
To post to this group, send email to h2-database@googlegroups.com.
Visit this group at https://groups.google.com/group/h2-database.
For more options, visit https://groups.google.com/d/optout.


[h2] Re: What is the last stable version of H2 for 1.4.x versions.

2016-08-11 Thread Steve McLeod
The website info is accurate. The latest stable is 1.3.176. There has not 
yet been a 1.4.x version marked as stable. I think it is likely that the 
next 1.4.x update will be marked as stable.

On Thursday, 11 August 2016 08:06:03 UTC+2, lakshman udayakantha wrote:
>
> Hi,
>
> H2Database site says that last stable version is 1.3.176. Is there any 
> last stable version in 1.4.x versions?
>
> Thanks
> Lakshman
>

-- 
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 h2-database+unsubscr...@googlegroups.com.
To post to this group, send email to h2-database@googlegroups.com.
Visit this group at https://groups.google.com/group/h2-database.
For more options, visit https://groups.google.com/d/optout.