Subject Re: [Firebird-Java] Re: Performance bug located and solved
Author Blas Rodriguez Somoza
Hello Roman

First at all, Interclient uses also a default charset not NONE but ISO8859_1, this the reason why I do that.

>> In inserts of character data this means a performance
>> penalty of about 10% and 20%.

>Can you discuss thin in firebird-devel list?

I will post a question to the devel list immediately.

> We had this issue before. There were a code when lc_ctype was
> determined from "file.encoding" property and there were a lot of
> problems with it. I strongly recommend "NONE".

Of course if we find an error I can't solve, I will rollback the change, but let me try to solve the problems if they come.

Perhaps if you can tell me which problems, I can analyze it. I think the performance difference justify some work.

About the way to get the defaultCharacterSet of the JVM, Sun recomends as the only valid method the one you can see in the
getDefaultJavaEncoding method in FBConnectionHelper class. They mention that no other method can be used in all the platforms.

> Sorry, JayBird is a client software, this means that server determines
> what and how driver sends to server and not vice versa.

In the remote protocol of firebird, if I'm not wrong, is the client who decide which character set to use, the same that happens
with the dialect, or the protocol. The server only validates is the request was wrong or not. The characterSet the client send to
the server are used for
- Communicate to the server which characterSet it receives, if the server don't know that, it seems it verify the charset.
- Request from the server which characterset wants in the data sended from the server to the client.

According to the code (jrd.cpp) this option is only available since Interbase 4.x.

> > For windows systems the charset of the database must be set
> > to WIN1252.
> Can you explain this? Why do we enforce charset of the database?

When you create a database you define the defaultCharset. The best performance will be obtained if the database default character
set is the same as the Java defaultCharacterSet, of course this is only valid for a server for which all the default character sets
of the clients are the same.

Best Regards
Blas Rodriguez Somoza.