Patch to track progress of long-running query

39 views
Skip to first unread message

Steve McLeod

unread,
May 4, 2012, 7:46:07 AM5/4/12
to h2-da...@googlegroups.com
I'd like to submit this patch which finishes my earlier additions to DatabaseEventListener. Now, while running a query, DatabaseEventListener.setProgress is called periodically to indicate how many rows have been handled so far. There's a new state called STATE_STATEMENT_PROGRESS. 

I've been testing this thoroughly with some large databases (e.g. 5 Gigabytes), and with a GUI that uses the DatabaseEventListener to show progress. It now allows me to accurately inform the user of the progress being made in long-running queries.

I wrote the code, it's mine, and I'm contributing it to H2 for distribution multiple-licensed under the H2 License, version 1.0, and under the Eclipse Public License, version 1.0 (http://h2database.com/html/license.html).

I also tried adding a similar notification to DDL commands such as DROP TABLE, but alas, I failed to find a way that didn't involve making significant changes to H2 code.

Regards,

Steve 
---------------------------------------------------
Steve McLeod
Founder, Poker Copilot

DatabaseEventListener_STATE_STATEMENT_PROGRESS.patch

Thomas Mueller

unread,
May 10, 2012, 3:08:24 AM5/10/12
to h2-da...@googlegroups.com
Hi,

This looks good! I gave you commit rights, so you can commit it yourself now. Please tell me if you want me to commit it for you.

Regards,
Thomas
--
You received this message because you are subscribed to the Google Groups "H2 Database" group.
To view this discussion on the web visit https://groups.google.com/d/msg/h2-database/-/8RP4lf3mgvQJ.
To post to this group, send email to h2-da...@googlegroups.com.
To unsubscribe from this group, send email to h2-database...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/h2-database?hl=en.

Steve McLeod

unread,
May 10, 2012, 9:48:39 AM5/10/12
to h2-da...@googlegroups.com
Thanks Thomas.

I'll commit it myself today.

Regards,

Steve 
To unsubscribe from this group, send email to h2-database+unsubscribe@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages