Subject Re: Performance bug located and solved
Author Roman Rokytskyy

> The problem is that Jaybird, if the user don't set lc_type
> parameter, don't send any character type identification to the
> server.

NONE is the default character set according to the API reference. You
can specify, you can ignore it.

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

Can you discuss thin in firebird-devel list?

> Now the driver, if the user don't set lc_type, find which
> character set to notify to the server.

Sorry, I'm not sure this is the best approach. In IB API no lc_ctype
means "NONE". This is one of the thing that was in InterBase (and now
in Firebird) for a quite long time and I would prefer to keep it so.
We can put notice about performance penalty in H1 tag in a FAQ and
release notes, but I would prefer to have "NONE".

> To find the character set the driver send to the Server:
> - If the default java encoding has an equivalent encoding in
> firebird the driver send it.
> - If the default java encoding has not an equivalente
> encoding in firebird use ISO8859_1.
> NONE is bad for performance, used in the server is bad for
> selects, and used in the client bad for inserts.
> Only if NONE is used in the two sides the performance will
> be good, but have another problems when moving data, tools that
> need the encoding etc.

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".

> Now, for the performance to be the best, the character set
> of the database must be the equivalent of the Default java
> encoding.

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

> 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?