Hi,

I don't know exactly what problem you want to solve, but generally
using JSON is a good idea. It's better than using XML in most cases.

> The database would be in server mode and rather than have the client
> application perform the select and iterate through the resultset; I am
> wondering if it would be faster for a user-defined function to perform
> the select, iterate through and return the JSON.

I don't think it will be much faster or slower to use JSON instead of
a result set.

> When a client iterates through the resultset, how is the data moved
> from the H2 server to the app ?  (what size chunks ?)

The fetch size is 100 rows by default, but you can configure it:

http://h2database.com/javadoc/org/h2/jdbc/JdbcStatement.html#setFetchSize_int
http://h2database.com/javadoc/org/h2/constant/SysProperties.html#h2.serverResultSetFetchSize

> What would be the appropriate output datatype to use to return the
> JSON?

I would probably return VARCHAR / java.lang.String.

> If clob would that result in further disk writes before being
> sent to the client ?

Yes, I would avoid CLOB unless you are not sure if it will not fit in memory.

Regards,
Thomas

-- 
You received this message because you are subscribed to the Google Groups "H2 
Database" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/h2-database?hl=en.

Reply via email to