On 2/10/22 19:21, Dimitry Sibiryakov wrote:
Dmitry Yemanov wrote 10.02.2022 17:13:
Cannot the UTF8-translated SQL text (which is currently inside Statement::sqlText) be the key, to avoid dependency on the charset? I don't think that semantically different statements may have the same UTF8 representation. However, it would make sense to have a single cached statement for the same statement executed from different client charsets.

  Only if such translation is made right. Remember charset introducers.
  But apparently to transform the query before using it as a cache key is a right idea. Two queries different only by some whitespaces, comments or case (unless in literals) should not miss the cache.


I think that for the first time it\s enough to implement simple most cache. IMHO more precise detection (like different whitespaces, etc.) of same statements hardly makes big dufference in most cases. If we see solid effect from new cache - certainloy, it will be worth to make it better prepare search key. I.e. let's start from something simple and see does it make sense.




Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel

Reply via email to